If SSL_write returns with error code SSL_ERROR_WANT_WRITE, the next call to SSL_write must use identical arguments (identical pointer to buffer, identical buffer size).
The Connection logic doesn't currently adhere to this.
SSL_ERROR_WANT_WRITE doesn't occur so frequently and even when it does, there is a probability that the arguments will be the same anyway. But in those cases where the connection is very busy and more SIP messages are in the buffer, the SSL_write will fail and the connection may be dropped.
The error may look like this:
error:1409F07F:SSL routines:SSL3_WRITE_PENDING: bad write retry