File tree Expand file tree Collapse file tree
Source/Plugins/NetworkEvents Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -216,8 +216,14 @@ bool NetworkEvents::closesocket()
216216 zmq_ctx_destroy (zmqcontext); // this will cause the thread to exit
217217 zmqcontext = nullptr ;
218218
219+ if (!stopThread (500 ))
220+ {
221+ std::cerr << " Network thread timeout. Forcing thread termination, system could be lefr in an unstable state" << std::endl;
222+ }
223+
219224 if (! shutdown)
220225 createZmqContext ();// and this will take care that processor graph doesn't attempt to delete the context again
226+
221227 }
222228#endif
223229 return true ;
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ class NetworkEvents : public GenericProcessor
117117
118118 int urlport;
119119 String socketStatus;
120- bool threadRunning;
120+ std::atomic< bool > threadRunning;
121121
122122
123123private:
You can’t perform that action at this time.
0 commit comments