server: safeguard unexpected socket destruction

This commit is contained in:
Thomas Schoebel-Theuer 2022-08-16 14:11:31 +02:00 committed by Thomas Schoebel-Theuer
parent 03876c40eb
commit a505a391b5

View File

@ -529,6 +529,10 @@ int handler_thread(void *data)
goto clean_unlock;
}
brick_msleep(200);
if (!mars_socket_is_alive(sock)) {
status = -ECONNABORTED;
goto clean_unlock;
}
}
/* New protocol.