return on timeout
This commit is contained in:
parent
4542ebe1cb
commit
90b1e2c3c8
1 changed files with 1 additions and 0 deletions
|
@ -532,6 +532,7 @@ int libp2p_secio_unencrypted_read(struct SessionContext* session, unsigned char*
|
||||||
read_this_time = 0;
|
read_this_time = 0;
|
||||||
if ( (errno == EAGAIN) || (errno == EWOULDBLOCK)) {
|
if ( (errno == EAGAIN) || (errno == EWOULDBLOCK)) {
|
||||||
// TODO: use epoll or select to wait for socket to be writable
|
// TODO: use epoll or select to wait for socket to be writable
|
||||||
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
libp2p_logger_error("secio", "Error in libp2p_secio_unencrypted_read: %s\n", strerror(errno));
|
libp2p_logger_error("secio", "Error in libp2p_secio_unencrypted_read: %s\n", strerror(errno));
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue