[Bug]: UDP Port Not Released After Stopping Server #675
Labels
bug
Something isn't working
needs investigation
needs more info
waiting for response
waiting for the response from commenter
Actions I've taken before I'm here
What happened?
I am experiencing an issue where the UDP port is not being released after stopping the server using Gnet (versions v2.5.0 and v2.7.0). Even though I have correctly called the shutdown method and verified that the server has stopped, the UDP port continues to be in use.
Steps to Reproduce:
Start a UDP server using Gnet on a specific port (e.g., 40119).
Stop the server using gnet.Server.Stop() or similar shutdown logic.
Check the port using ss -unlap or lsof to confirm that the port is still being used.
The port remains in the "UNCONN" state with the associated process still holding the file descriptor.
Major version of gnet
v2
Specific version of gnet
v2.5.0 or v2.7.0
Operating system
Linux
OS version
Linux 4.18.0-305.3.1.el8.x86_64 x86_64
Go version
go version go1.22.0 darwin/amd64
Relevant log output
Code snippets (optional)
How to Reproduce
1、CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-w -s"
2、./app
3、ss -unlap
Does this issue reproduce with the latest release?
It can reproduce with the latest release
The text was updated successfully, but these errors were encountered: