diff --git a/src/DebugServer/Gdb/Connection.cpp b/src/DebugServer/Gdb/Connection.cpp index 48bbba71..06ae6b7e 100644 --- a/src/DebugServer/Gdb/Connection.cpp +++ b/src/DebugServer/Gdb/Connection.cpp @@ -200,10 +200,12 @@ namespace Bloom::DebugServer::Gdb const auto eventFileDescriptor = this->epollInstance.waitForEvent(timeout); - if ( - !eventFileDescriptor.has_value() - || eventFileDescriptor.value() == this->interruptEventNotifier.getFileDescriptor() - ) { + if (!eventFileDescriptor.has_value()) { + // Timed out + return output; + } + + if (eventFileDescriptor.value() == this->interruptEventNotifier.getFileDescriptor()) { // Interrupted this->interruptEventNotifier.clear(); throw DebugServerInterrupted();