diff options
author | Ed Maste <emaste@FreeBSD.org> | 2014-11-25 21:00:58 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2014-11-25 21:00:58 +0000 |
commit | 0cac4ca3916ac24ab6139d03cbfd18db9e715bfe (patch) | |
tree | c94307da318be46e5aeea1a325c1e91749506e4f /source/Core/Communication.cpp | |
parent | 03b99097822ca3ac69252d9afae716a584ed56c4 (diff) |
Notes
Diffstat (limited to 'source/Core/Communication.cpp')
-rw-r--r-- | source/Core/Communication.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source/Core/Communication.cpp b/source/Core/Communication.cpp index f05ce320b5be4..d71c9881a6f30 100644 --- a/source/Core/Communication.cpp +++ b/source/Core/Communication.cpp @@ -380,11 +380,24 @@ Communication::ReadThread (lldb::thread_arg_t p) if (comm->GetCloseOnEOF()) done = true; break; + case eConnectionStatusError: // Check GetError() for details + if (error.GetType() == eErrorTypePOSIX && error.GetError() == EIO) + { + // EIO on a pipe is usually caused by remote shutdown + comm->Disconnect (); + done = true; + } + if (log) + error.LogIfError (log, + "%p Communication::ReadFromConnection () => status = %s", + p, + Communication::ConnectionStatusAsCString (status)); + break; case eConnectionStatusNoConnection: // No connection case eConnectionStatusLostConnection: // Lost connection while connected to a valid connection + case eConnectionStatusInterrupted: // Interrupted done = true; // Fall through... - case eConnectionStatusError: // Check GetError() for details case eConnectionStatusTimedOut: // Request timed out if (log) error.LogIfError (log, @@ -433,6 +446,7 @@ Communication::ConnectionStatusAsCString (lldb::ConnectionStatus status) case eConnectionStatusNoConnection: return "no connection"; case eConnectionStatusLostConnection: return "lost connection"; case eConnectionStatusEndOfFile: return "end of file"; + case eConnectionStatusInterrupted: return "interrupted"; } static char unknown_state_string[64]; |