Fleck icon indicating copy to clipboard operation
Fleck copied to clipboard

port still open after disposing the server

Open jshafer817 opened this issue 5 years ago • 2 comments

I notice my socket server still has a port open after it is disposed and turned to null.

//Close websocket clients foreach (var client in allSockets) client.Close(); server.Dispose(); server = null;

Is this normal?

jshafer817 avatar Jun 17 '19 14:06 jshafer817

That isn't normal. Can you give more details on platform, if you're using SSL, does this happen if you dispose the server before any clients have connected?

statianzo avatar Jun 17 '19 15:06 statianzo

Windows 7 SP1 X64 is the platform. It does this if a client has never connected. I have a winforms app that disables and enables the socket server with buttons, but oddly enough the port is still open when the server is disposed. I have messageboxes in place to check. ;) Edit: No SSL

jshafer817 avatar Jun 17 '19 16:06 jshafer817