Chromium Code Reviews| Index: webrtc/base/physicalsocketserver.cc |
| diff --git a/webrtc/base/physicalsocketserver.cc b/webrtc/base/physicalsocketserver.cc |
| index e2ec589eb12d0229febab295fe420472957f3a9b..5acc94db66fc2119133babae7f35d964758d0f3a 100644 |
| --- a/webrtc/base/physicalsocketserver.cc |
| +++ b/webrtc/base/physicalsocketserver.cc |
| @@ -706,18 +706,14 @@ bool SocketDispatcher::IsDescriptorClosed() { |
| // Returned during ungraceful peer shutdown. |
| case ECONNRESET: |
| return true; |
| - default: |
| - // Assume that all other errors are just blocking errors, meaning the |
| - // connection is still good but we just can't read from it right now. |
| - // This should only happen when connecting (and at most once), because |
| - // in all other cases this function is only called if the file |
| - // descriptor is already known to be in the readable state. However, |
| - // it's not necessary a problem if we spuriously interpret a |
| - // "connection lost"-type error as a blocking error, because typically |
| - // the next recv() will get EOF, so we'll still eventually notice that |
| - // the socket is closed. |
| - LOG_ERR(LS_WARNING) << "Assuming benign blocking error"; |
| + // This should only happen when connecting (and at most once), because |
| + // in all other cases this function is only called if the file |
| + // descriptor is already known to be in the readable state. |
| + case EWOULDBLOCK: |
| return false; |
| + default: |
| + LOG_ERR(LS_WARNING) << "Unexpected error from recv"; |
| + return true; |
|
Taylor Brandstetter
2017/02/09 08:59:47
I don't think this is safe. There are errors besid
|
| } |
| } |
| } |