return on timeout

yamux
John Jones 2017-07-31 10:00:32 -05:00
parent 4542ebe1cb
commit 90b1e2c3c8
1 changed files with 1 additions and 0 deletions

View File

@ -532,6 +532,7 @@ int libp2p_secio_unencrypted_read(struct SessionContext* session, unsigned char*
read_this_time = 0;
if ( (errno == EAGAIN) || (errno == EWOULDBLOCK)) {
// TODO: use epoll or select to wait for socket to be writable
return 0;
} else {
libp2p_logger_error("secio", "Error in libp2p_secio_unencrypted_read: %s\n", strerror(errno));
return 0;