I have a bunch of worker threads that consume a piece of work, deal with that work, and then move on to another piece of work. I've discovered today that if a thread processes a piece of work and a SSL call in that work has an error, and that error isn't consumed with a call to SSL_get_error and ERR_get_error that when the thread pulls the next piece of work a subsequent SSL call can fail.
In this particular case, a failure during SSL_accept for one piece of work caused SSL_read to later fail on a unassociated connection being processed by the same thread. I discovered this because I realized after reading through the openssl code that the messages in the error queue didn't make any sense for SSL_read, and when I went back and added the calls to SSL_get_error and ERR_get_error to the SSL_accept call error handling suddenly everything started to work. Is this documented anywhere? Or am I wrong and this shouldn't be happening? -- *David Hinkle* *Senior Software Developer* *Phone:* 800.243.3729x3000 *Email:* hin...@cipafilter.com *Hours:* Mon-Fri 8:00AM-5:00PM (CT)