diff --git a/src/oatpp/network/tcp/client/ConnectionProvider.cpp b/src/oatpp/network/tcp/client/ConnectionProvider.cpp index 1896e20b..e165d2bb 100644 --- a/src/oatpp/network/tcp/client/ConnectionProvider.cpp +++ b/src/oatpp/network/tcp/client/ConnectionProvider.cpp @@ -282,7 +282,10 @@ oatpp::async::CoroutineStarterForResult(m_clientHandle)); + return _return(provider::ResourceHandle( + std::make_shared(m_clientHandle), + m_connectionInvalidator + )); } if(error == WSAEWOULDBLOCK || error == WSAEINPROGRESS) { return ioWait(m_clientHandle, oatpp::async::Action::IOEventType::IO_EVENT_WRITE);