Weird SSL_read error: 5 or 6
crienzo opened this issue · 2 comments
kws.c:393 - this error is a normal thing that can happen when a connection closes and should not be logged at an error level.
SSL_ERROR_SYSCALL (5)
Some non-recoverable, fatal I/O error occurred. The OpenSSL error queue may contain more information on the error. For socket I/O on Unix systems, consult errno for details. If this error occurs then no further I/O operations should be performed on the connection and SSL_shutdown() must not be called.
This value can also be returned for other errors, check the error queue for details.
SSL_ERROR_ZERO_RETURN (6)
The TLS/SSL peer has closed the connection for writing by sending the close_notify alert. No more data can be read. Note that SSL_ERROR_ZERO_RETURN does not necessarily indicate that the underlying transport has been closed.
Good catch, I recall it being added to debug a signalwire-c issue, we can probably silence it to a lesser warning for sentry sake, and possibly even shortcut the error 6. Should probably add some extra output of the error queue for 5 as well, but for now I'll just set it to a warning so we can identify if something weird happens there, and maybe remove logging on 6 altogether as it's a nominal step in a graceful close.