SSL_accept() error handling fix