WebsocketServer never closes port properly
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Whenever I use the websocket server, then close it, I can never re-open that port (address in use).
Websocket client closes okay.
Client connects and sends messages fine.
I have to close the process before the port is free again.
No logging reported (so looking through code, but not yet stepped through, it should have at least tried to close the listener)
Using in unity, (using experimental 4.6 .net) on OSX. Built DLL in visual studio community.
this.Socket = new WebSocketServer(LocalAddress, Port);
this.Socket.Start();
and later
this.Socket.Stop();
Will be stepping through the Stop() code shortly
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with WebSocketServer.Start() and Stop() using the Unity/OSX setup described, then step through the Stop() code and listener lifecycle. Confirm that the port remains unavailable after Stop() and identify what prevents the listener from being closed. Done means the same port can be reopened after stopping without terminating the process.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100