At the moment, if a link quits in just the right (wrong [1]) way,
the quit reason will resemble:
<-- foo (~bar@baz) has quit (Read error: (-0x0) )
This should resolve that.
[1] Peers should send a close_notify alert before abruptly shutting
down their socket. This will result in a sane quit message:
<-- foo (~bar@baz) has quit (Read error: (-0x7880) SSL -
The peer notified us that the connection is going to be closed)
[ci skip]
ssize_t ret = (ssize_t) mbedtls_ssl_read(SSL_P(F), buf, count);
- if(ret > 0)
+ if(ret >= 0)
return ret;
switch(ret)
ssize_t ret = (ssize_t) mbedtls_ssl_write(SSL_P(F), buf, count);
- if(ret > 0)
+ if(ret >= 0)
return ret;
switch(ret)