Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commits (1)
  • Deucе's avatar
    Close Socket on unhandled TLS errors · ec7f57ab
    Deucе authored
    While errors on transmit seem to be handled well, errors on receive
    do not, especially through js_recv_line() which has been seen to
    trigger a large number (hundreds) of ECONNRESET errors.  To prevent
    this, simply close the socket when an otherwise unhandled error
    occurs.
    
    Almost certainly fixes that issue, but the underlying cause is still
    undetermined.  The calling script (imapservice.js) was checking
    Socket.is_connected after each recv_line() call, so if the socket
    was actually reset, it would be expected to only call it once.
    
    An alternative would be to explicitly handle the error that is
    seen (CRYPT_ERROR_PARAM1), but let's try a generic fix first and see
    of anything breaks because of it.  Most likely issue would be an
    inability to recv() data after calling shutdown(), but I don't think
    many people do that except to move the TIME_WAIT to where they want
    it.
    ec7f57ab
......@@ -242,8 +242,10 @@ static ptrdiff_t js_socket_recv(js_socket_private_t *p, void *buf, size_t len, i
ret = -1;
if (status == CRYPT_ERROR_TIMEOUT)
ret = 0;
else if (status != CRYPT_ERROR_COMPLETE)
else if (status != CRYPT_ERROR_COMPLETE) {
GCES(ret, p, estr, "popping data");
do_js_close(p, false);
}
}
}
if (ret == -1) {
......