Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I close it frequently, there will be an unrecoverable panic. #153

Closed
Capybara-1 opened this issue Mar 29, 2023 · 3 comments
Closed

Comments

@Capybara-1
Copy link

I'm sorry that I used this framework in a strange way again.

When I frequently shut down gen.Tcp during the test

There will be an unrecoverable crash.

e.g.
image

My code is as follows.
截屏2023-03-29 20 40 21

My Sup Strategy Is

Strategy: gen.SupervisorStrategy{
Type: gen.SupervisorStrategyOneForOne,
Intensity: 10,
Period: 1,
Restart: gen.SupervisorStrategyRestartTransient,
},

Child Spec is

return gen.TCPOptions{
Host: args[0].(string),
Port: args[1].(uint16),
Handler: &handle{},
NumHandlers: 10,
MaxPacketSize: math.MaxUint16,
ExtraHandlers: true,
}, nil

The specific log is as follows

2023-03-29T20:37:09+08:00 INFO [<93E711D7.0.18297>] Connector Init...
2023-03-29T20:37:09+08:00 INFO [<93E711D7.0.18300>] Connector Init...
2023-03-29T20:37:09+08:00 INFO New Connect From [127.0.0.1:59074] Connector Pid [<93E711D7.0.18300>]
2023-03-29T20:37:09+08:00 INFO [<93E711D7.0.18302>] Connector Init...
2023-03-29T20:37:09+08:00 INFO [<93E711D7.0.18304>] Connector Init...
2023-03-29T20:37:09+08:00 INFO New Connect From [127.0.0.1:59074] Connector Pid [<93E711D7.0.18302>]
2023-03-29T20:37:09+08:00 INFO [<93E711D7.0.21179>] Connector Init...
2023-03-29T20:37:09+08:00 INFO New Connect From [127.0.0.1:59074] Connector Pid [<93E711D7.0.21179>]
2023-03-29T20:37:09+08:00 INFO [<93E711D7.0.18314>] Connector Init...
2023-03-29T20:37:09+08:00 INFO [<93E711D7.0.18316>] Connector Init...
2023-03-29T20:37:09+08:00 INFO New Connect From [127.0.0.1:59074] Connector Pid [<93E711D7.0.18314>]
2023-03-29T20:37:09+08:00 INFO [<93E711D7.0.18321>] Connector Init...
2023-03-29T20:37:09+08:00 INFO New Connect From [127.0.0.1:59074] Connector Pid [<93E711D7.0.18316>]
2023-03-29T20:37:09+08:00 INFO [<93E711D7.0.18325>] Connector Init...
2023-03-29T20:37:09+08:00 INFO [<93E711D7.0.18327>] Connector Init...
2023-03-29T20:37:09+08:00 INFO New Connect From [127.0.0.1:59074] Connector Pid [<93E711D7.0.18325>]
2023-03-29T20:37:09+08:00 INFO [<93E711D7.0.18329>] Connector Init...
2023-03-29T20:37:09+08:00 INFO [<93E711D7.0.18331>] Connector Init...
2023-03-29T20:37:09+08:00 INFO [<93E711D7.0.18333>] Connector Init...
2023-03-29T20:37:09+08:00 INFO New Connect From [127.0.0.1:59074] Connector Pid [<93E711D7.0.18331>]
2023-03-29T20:37:09+08:00 INFO [<93E711D7.0.18337>] Connector Init...
2023-03-29T20:37:09+08:00 INFO [<93E711D7.0.18342>] Connector Init...
panic: assignment to entry in nil map

@halturin
Copy link
Collaborator

yeah, I'm aware of that and its already fixed in my local dev branch.

@Capybara-1
Copy link
Author

Thank you

@halturin
Copy link
Collaborator

halturin commented Apr 2, 2023

fixed in v2.2.3

@halturin halturin closed this as completed Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants