https://gitlab.synchro.net/main/sbbs/-/commit/ec7f57ab985273580f085bbb
Modified Files:
src/sbbs3/js_socket.c
Log Message:
Close Socket on unhandled TLS errors
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.
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net