mirror of
https://github.com/boostorg/mqtt5.git
synced 2025-11-08 03:41:36 +01:00
Add Windows specific error codes to should-reconnect condition
Summary: related to T11798 Reviewers: ivica Reviewed By: ivica Subscribers: miljen, iljazovic Differential Revision: https://repo.mireo.local/D28103
This commit is contained in:
@@ -110,10 +110,14 @@ private:
|
||||
|
||||
static bool should_reconnect(error_code ec) {
|
||||
using namespace asio::error;
|
||||
return ec == connection_aborted || ec == not_connected ||
|
||||
// note: Win ERROR_SEM_TIMEOUT == Posix ENOLINK (Reserved)
|
||||
return ec.value() == 1236L || /* Win ERROR_CONNECTION_ABORTED */
|
||||
ec.value() == 121L || /* Win ERROR_SEM_TIMEOUT */
|
||||
ec == connection_aborted || ec == not_connected ||
|
||||
ec == timed_out || ec == connection_reset ||
|
||||
ec == broken_pipe || ec == asio::error::eof;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -91,9 +91,12 @@ private:
|
||||
|
||||
static bool should_reconnect(error_code ec) {
|
||||
using namespace asio::error;
|
||||
return ec == connection_aborted || ec == not_connected
|
||||
|| ec == timed_out || ec == connection_reset
|
||||
|| ec == broken_pipe || ec == asio::error::eof;
|
||||
// note: Win ERROR_SEM_TIMEOUT == Posix ENOLINK (Reserved)
|
||||
return ec.value() == 1236L || /* Win ERROR_CONNECTION_ABORTED */
|
||||
ec.value() == 121L || /* Win ERROR_SEM_TIMEOUT */
|
||||
ec == connection_aborted || ec == not_connected ||
|
||||
ec == timed_out || ec == connection_reset ||
|
||||
ec == broken_pipe || ec == asio::error::eof;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user