Wait using a condition variable in server
Currently, server_stop() is called from the same thread as server_connect_to(), so interruption may never happen. This is a step to prepare executing the server from a dedicated thread.
This commit is contained in:
@@ -47,6 +47,10 @@ struct server {
|
||||
// alive only between start() and stop()
|
||||
struct sc_process_observer observer;
|
||||
|
||||
sc_mutex mutex;
|
||||
sc_cond cond_stopped;
|
||||
bool stopped;
|
||||
|
||||
sc_socket server_socket; // only used if !tunnel_forward
|
||||
sc_socket video_socket;
|
||||
sc_socket control_socket;
|
||||
|
||||
Reference in New Issue
Block a user