Made a few read/write tweaks

This commit is contained in:
Fred Nicolson 2017-03-24 20:18:08 +00:00
parent 8ec22b7c56
commit 4512bd49e7

View File

@ -31,12 +31,7 @@ namespace fr
}
else if(errno != EWOULDBLOCK && errno != EAGAIN) //Don't exit if the socket just couldn't block
{
if(status == -1)
{
return Socket::Status::Error;
}
is_connected = false;
close_socket();
return Socket::Status::Disconnected;
}
}
@ -69,12 +64,8 @@ namespace fr
{
return Socket::Status::WouldBlock;
}
else if(status == -1)
{
return Socket::Status::Error;
}
is_connected = false;
close_socket();
return Socket::Status::Disconnected;
}