diff options
Diffstat (limited to 'rpc/rpc-transport')
-rw-r--r-- | rpc/rpc-transport/socket/src/socket.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index b8815773f41..4b1505c4eef 100644 --- a/rpc/rpc-transport/socket/src/socket.c +++ b/rpc/rpc-transport/socket/src/socket.c @@ -263,6 +263,11 @@ ssl_do (rpc_transport_t *this, void *buf, size_t len, SSL_trinary_func *func) } break; case SSL_ERROR_WANT_WRITE: + if ((func == (SSL_trinary_func *)SSL_read) + || (func == (SSL_trinary_func *) SSL_write)) { + errno = EAGAIN; + return r; + } pfd.fd = priv->sock; pfd.events = POLLOUT; if (poll(&pfd,1,-1) < 0) { |