diff --git a/src/oatpp/network/Connection.cpp b/src/oatpp/network/Connection.cpp index df4fc4db..48cb0630 100644 --- a/src/oatpp/network/Connection.cpp +++ b/src/oatpp/network/Connection.cpp @@ -79,13 +79,15 @@ Connection::~Connection(){ data::v_io_size Connection::write(const void *buff, v_buff_size count, async::Action& action){ #if defined(WIN32) || defined(_WIN32) - + OATPP_LOGD("AAA", "Connection[%d] write want %d", this, count); auto result = ::send(m_handle, (const char*) buff, (int)count, 0); - + OATPP_LOGD("AAA", "Connection[%d] write %d", this, result); if(result == SOCKET_ERROR) { auto e = WSAGetLastError(); + OATPP_LOGD("AAA", "Connection[%d] write error %d mode=%d", this, e, m_mode); + if(e == WSAEWOULDBLOCK){ if(m_mode == data::stream::ASYNCHRONOUS) { action = oatpp::async::Action::createIOWaitAction(m_handle, oatpp::async::Action::IOEventType::IO_EVENT_WRITE); @@ -136,13 +138,15 @@ data::v_io_size Connection::write(const void *buff, v_buff_size count, async::Ac data::v_io_size Connection::read(void *buff, v_buff_size count, async::Action& action){ #if defined(WIN32) || defined(_WIN32) - + OATPP_LOGD("AAA", "Connection[%d] read want %d", this, count); auto result = ::recv(m_handle, (char*)buff, (int)count, 0); - + OATPP_LOGD("AAA", "Connection[%d] read %d", this, result); if(result == SOCKET_ERROR) { auto e = WSAGetLastError(); + OATPP_LOGD("AAA", "Connection[%d] read error %d mode=%d", this, e, m_mode); + if(e == WSAEWOULDBLOCK){ if(m_mode == data::stream::ASYNCHRONOUS) { action = oatpp::async::Action::createIOWaitAction(m_handle, oatpp::async::Action::IOEventType::IO_EVENT_READ); diff --git a/test/oatpp/AllTestsMain.cpp b/test/oatpp/AllTestsMain.cpp index e9bd0056..cdf28dc1 100644 --- a/test/oatpp/AllTestsMain.cpp +++ b/test/oatpp/AllTestsMain.cpp @@ -108,30 +108,30 @@ void runTests() { OATPP_RUN_TEST(oatpp::test::web::server::handler::AuthorizationHandlerTest); */ - { - - oatpp::test::web::PipelineTest test_virtual(0, 3000); - test_virtual.run(); - - oatpp::test::web::PipelineTest test_port(8000, 3000); - test_port.run(); - - } +// { +// +// oatpp::test::web::PipelineTest test_virtual(0, 3000); +// test_virtual.run(); +// +// oatpp::test::web::PipelineTest test_port(8000, 3000); +// test_port.run(); +// +// } +// +// { +// +// oatpp::test::web::PipelineAsyncTest test_virtual(0, 3000); +// test_virtual.run(); +// +// oatpp::test::web::PipelineAsyncTest test_port(8000, 3000); +// test_port.run(); +// +// } { - oatpp::test::web::PipelineAsyncTest test_virtual(0, 3000); - test_virtual.run(); - - oatpp::test::web::PipelineAsyncTest test_port(8000, 3000); - test_port.run(); - - } - - { - - oatpp::test::web::FullTest test_virtual(0, 1000); - test_virtual.run(); +// oatpp::test::web::FullTest test_virtual(0, 1000); +// test_virtual.run(); oatpp::test::web::FullTest test_port(8000, 5); test_port.run(); @@ -140,8 +140,8 @@ void runTests() { { - oatpp::test::web::FullAsyncTest test_virtual(0, 1000); - test_virtual.run(); +// oatpp::test::web::FullAsyncTest test_virtual(0, 1000); +// test_virtual.run(); oatpp::test::web::FullAsyncTest test_port(8000, 5); test_port.run(); @@ -150,8 +150,8 @@ void runTests() { { - oatpp::test::web::FullAsyncClientTest test_virtual(0, 1000); - test_virtual.run(20); +// oatpp::test::web::FullAsyncClientTest test_virtual(0, 1000); +// test_virtual.run(20); oatpp::test::web::FullAsyncClientTest test_port(8000, 10); test_port.run(1); @@ -160,8 +160,8 @@ void runTests() { { - oatpp::test::web::ClientRetryTest test_virtual(0); - test_virtual.run(); +// oatpp::test::web::ClientRetryTest test_virtual(0); +// test_virtual.run(); oatpp::test::web::ClientRetryTest test_port(8000); test_port.run();