Improve ENet socket error propagation for better debuggability

This commit is contained in:
Cameron Gutman
2023-12-22 13:45:50 -06:00
parent 3ed3ba6253
commit 3aae4cdc59
3 changed files with 13 additions and 4 deletions

View File

@@ -1068,6 +1068,10 @@ static void controlReceiveThreadFunc(void* context) {
}
if (err < 0) {
// The error from serviceEnetHost() should be propagated via LastSocketError()
LC_ASSERT(err == -1);
err = LastSocketFail();
Limelog("Control stream connection failed: %d\n", err);
ListenerCallbacks.connectionTerminated(err);
return;