diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index acf5878..d9bb266 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -117,9 +117,9 @@ jobs: Invoke-WebRequest "https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/nasm-2.15.05-win64.zip" -OutFile "nasm-2.15.05-win64.zip" Expand-Archive "nasm-2.15.05-win64.zip" -Force -DestinationPath "C:\NASM" $env:Path += ";C:\NASM\nasm-2.15.05\" - git clone https://github.com/openssl/openssl.git - cd openssl - git checkout OpenSSL_1_1_1-stable + Invoke-WebRequest "https://github.com/openssl/openssl/archive/refs/tags/openssl-3.0.12.zip" -OutFile "openssl-3.0.12.zip" + Expand-Archive "openssl-3.0.12.zip" -Force + cd .\openssl-3.0.12\openssl-3.0.12\ perl Configure VC-WIN64A nmake nmake install diff --git a/src/TcpAdapterProxy.cpp b/src/TcpAdapterProxy.cpp index 9fc7c0a..7c1820b 100644 --- a/src/TcpAdapterProxy.cpp +++ b/src/TcpAdapterProxy.cpp @@ -377,7 +377,14 @@ namespace aws { namespace iot { namespace securedtunneling { { tcp_connection::pointer connection_to_reset = get_tcp_connection(tac, service_id, connection_id); BOOST_LOG_SEV(this->log, trace) << "Post-reset TCP drain complete. Closing TCP socket for service id " << service_id << " connection id " << connection_id; - BOOST_LOG_SEV(this->log, info) << "Disconnected from: " << connection_to_reset->socket().remote_endpoint(); + try + { + BOOST_LOG_SEV(this->log, info) << "Disconnected from: " << connection_to_reset->socket().remote_endpoint(); + } + catch (std::exception& e) + { + BOOST_LOG_SEV(this->log, info) << "Disconnecting... remote endpoint not found due to TCP connection already terminated"; + } connection_to_reset->socket_.close(); delete_tcp_socket(tac, service_id, connection_id); *tcp_write_buffer_drain_complete = true; @@ -416,7 +423,14 @@ namespace aws { namespace iot { namespace securedtunneling { { tcp_connection::pointer connection_to_reset = get_tcp_connection(tac, service_id, connection_id); BOOST_LOG_SEV(this->log, trace) << "Post-reset TCP drain complete. Closing TCP socket for service id " << service_id << " connection id " << connection_id; - BOOST_LOG_SEV(this->log, info) << "Disconnected from: " << connection_to_reset->socket().remote_endpoint(); + try + { + BOOST_LOG_SEV(this->log, info) << "Disconnected from: " << connection_to_reset->socket().remote_endpoint(); + } + catch (std::exception& e) + { + BOOST_LOG_SEV(this->log, info) << "Disconnecting... remote endpoint not found due to TCP connection already terminated"; + } connection_to_reset->socket_.close(); delete_tcp_socket(tac, service_id, connection_id); }; @@ -507,7 +521,7 @@ namespace aws { namespace iot { namespace securedtunneling { } catch (std::exception& e) { - BOOST_LOG_SEV(this->log, info) << "Disconnecting... remote endpoint not found"; + BOOST_LOG_SEV(this->log, info) << "Disconnecting... remote endpoint not found due to TCP connection already terminated"; } connection->tcp_write_buffer_.consume(connection->tcp_write_buffer_.max_size()); // this works on Linux x86_64 but causes a bus error on Darwin arm64, commenting it out