freeswitch / sofia-sip

Sofia-SIP is an open-source SIP User-Agent library, compliant with the IETF RFC3261 specification.
GNU Lesser General Public License v2.1
254 stars 173 forks source link

[sofia-sip] fix issue 2283 by checking for SSL_ERROR_SSL and SSL_ERRO… #231

Open themsley-voiceflex opened 9 months ago

themsley-voiceflex commented 9 months ago

…R_SYSCALL and avoiding socket i/o if so

Also adds various error checks to make sure we always operate on a valid socket and sets a 5 second timeout on the SSL_write call in ws_close() to avoid waiting forever on something that isn't talking to us. Plus a check before SSL_read when the connection is marked down. There is one stray printf debug message left in this commit that should probably be turned into something more freeswitchish to log it somewhere better.