bumptech/stud — pull request #100 by losipiuk (2012-06-04 09:18:14+00:00)
Title: Add call ERR_clear_error() before SSL_* calls

SSL_get_error function requires calling ERR_clear_error queue
before executing function which error code is to be determined.
Otherwise spurious error codes may be returned even for successful
operations.

http://www.openssl.org/docs/ssl/SSL_get_error.html