Improve ENet socket error propagation for better debuggability

This commit is contained in:
Cameron Gutman committed 2023-12-22 13:45:50 -06:00
1 parent 3ed3ba6253
commit 3aae4cdc59
3 files changed
+13 -4

No files matched your search

+4
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;