08-01-2026, 11:27 AM
I have a HTTP Server that performs the upgrade to a WebSocket server after serving the client with the html file containing the websocket client code on connect. Everything is working fine except the original TCP Thread is hanging in there as a ghost thread after the websocket upgrade, that is using a new thread.
I am looking for a possible way on how to terminate that thread. I can post the relevant snippet where the upgrade is happening, if required.
This is based on TIdCustomTCPServer and staspiter Websocketserver.
Thank you for any fixes or pointers.
I am looking for a possible way on how to terminate that thread. I can post the relevant snippet where the upgrade is happening, if required.
This is based on TIdCustomTCPServer and staspiter Websocketserver.
Thank you for any fixes or pointers.

