add an option to clear error before calling ssl methods
authorSubodh Iyengar <subodh@fb.com>
Tue, 10 Jan 2017 23:51:33 +0000 (15:51 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 11 Jan 2017 00:02:57 +0000 (16:02 -0800)
commit3a8c98ea2b9d70762b562e0c4b8aff7fbfd683a5
tree8aa2690f29abd8f1332ed6b20d3a546caf4ab192
parent266c83777e21943f98cef4cb6cede367f083ba51
add an option to clear error before calling ssl methods

Summary:
Normally clearing out the error before calling into an openssl method
is a bad idea. However there might be other code outside AsyncSSLSocket
calling into openssl in the same thread that doesn't use openssl
correctly. This allows users of AsyncSSLSocket to safeguard themselves
from such code.

Reviewed By: anirudhvr

Differential Revision: D4389970

fbshipit-source-id: 12da254d6b281c2b9d522ba19999b2489c0083a2
folly/io/async/AsyncSSLSocket.cpp
folly/io/async/AsyncSSLSocket.h