Skip to content

Cannot reconnect quickly when client close #142

Description

@finishy1995

Describe the bug
OS: Windows X86_64
When client close and quick reconnect(about Second * 1) to gnet server, gnet will not call OnOpened(c Conn). And net.Listener.Accept() return err "use of closed network connection"

To Reproduce
Steps to reproduce the behavior:

  1. serve local tcp
  2. use net.Dial to connect gnet server
  3. close this connection when connected
  4. wait 1 second
  5. use net.Dial to connect gnet server
  6. cannot connect to gnet server

Expected behavior
Expect to reconnect to server quickly

Screenshots
/

System Info (please complete the following information):

  • OS (e.g. Ubuntu 18.04): Windows 10
  • Go version (e.g. Go 1.13): 1.15
  • gnet version (e.g. v1.0.0): 1.3.0

Additional context
This issue is related to both udp server. When udp client try to reconnect quickly, it will not call React() method.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwaiting for responsewaiting for the response from commenter

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions