mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-02-19 04:44:27 +01:00
Kill the server only after some delay
Let the server terminate properly once all the sockets are closed. If it does not terminate (this can happen if the device is asleep), then kill it. Fixes #1992 <https://github.com/Genymobile/scrcpy/issues/1992>
This commit is contained in:
@@ -18,6 +18,11 @@ struct server {
|
||||
process_t process;
|
||||
SDL_Thread *wait_server_thread;
|
||||
atomic_flag server_socket_closed;
|
||||
|
||||
SDL_mutex *mutex;
|
||||
SDL_cond *process_terminated_cond;
|
||||
bool process_terminated;
|
||||
|
||||
socket_t server_socket; // only used if !tunnel_forward
|
||||
socket_t video_socket;
|
||||
socket_t control_socket;
|
||||
|
||||
Reference in New Issue
Block a user