I’m so sorry to see that…
_needQuit = true; // this may be called when connection is close, and then _ws must be deleted.
// set _needQuit true is not safe enough to ensure _ws lives after wsThreadEntryFunc exiting...
// may be we should block here until wsThreadEntryFunc thread end
void* WsThreadHelper::wsThreadEntryFunc(void* arg)
_ws->onSubThreadEnded(); // this code run after quitSubThread(), and most of the time _ws is deleted
By the way,onSubThreadEnded is a virtual function, commenting the line is a bad solution…
Will this issue be fixed in next release?