mirror of
https://github.com/oatpp/oatpp.git
synced 2025-04-12 18:50:22 +08:00
Process review comments
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
This commit is contained in:
parent
f6f2d27b85
commit
dfc5e913f8
@ -76,6 +76,11 @@ Connection::~Connection(){
|
||||
close();
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wlogical-op"
|
||||
#endif
|
||||
|
||||
v_io_size Connection::write(const void *buff, v_buff_size count, async::Action& action){
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
@ -116,17 +121,8 @@ v_io_size Connection::write(const void *buff, v_buff_size count, async::Action&
|
||||
if(result < 0) {
|
||||
auto e = errno;
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wlogical-op"
|
||||
#endif
|
||||
|
||||
bool retry = ((e == EAGAIN) || (e == EWOULDBLOCK));
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
if(retry){
|
||||
if(m_mode == data::stream::ASYNCHRONOUS) {
|
||||
action = oatpp::async::Action::createIOWaitAction(m_handle, oatpp::async::Action::IOEventType::IO_EVENT_WRITE);
|
||||
@ -151,6 +147,15 @@ v_io_size Connection::write(const void *buff, v_buff_size count, async::Action&
|
||||
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wlogical-op"
|
||||
#endif
|
||||
|
||||
v_io_size Connection::read(void *buff, v_buff_size count, async::Action& action){
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
@ -186,17 +191,8 @@ v_io_size Connection::read(void *buff, v_buff_size count, async::Action& action)
|
||||
if(result < 0) {
|
||||
auto e = errno;
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wlogical-op"
|
||||
#endif
|
||||
|
||||
bool retry = ((e == EAGAIN) || (e == EWOULDBLOCK));
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
if(retry){
|
||||
if(m_mode == data::stream::ASYNCHRONOUS) {
|
||||
action = oatpp::async::Action::createIOWaitAction(m_handle, oatpp::async::Action::IOEventType::IO_EVENT_READ);
|
||||
@ -221,6 +217,10 @@ v_io_size Connection::read(void *buff, v_buff_size count, async::Action& action)
|
||||
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
void Connection::setStreamIOMode(oatpp::data::stream::IOMode ioMode) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user