return read error on non EAGAIN errno
authorShijin Kong <shikong@fb.com>
Mon, 26 Oct 2015 17:15:45 +0000 (10:15 -0700)
committerfacebook-github-bot-1 <folly-bot@fb.com>
Mon, 26 Oct 2015 18:20:24 +0000 (11:20 -0700)
commit209397bd28c1ecd569a0dae144d4729e79041a35
treea809fe47b6f9ec35063d77fb7b01e80c72754360
parent6b17defc455a4b8fb0a57dd23ccdcc4edba91ac5
return read error on non EAGAIN errno

Summary: Tested over weekend with D2571554. There was no EXC_RESOURCE/CPU crash when read errrors were returned on ENOTCONN. EAGAIN seems innocent as the spin detector was disabled on testing group.

Patch folly. I can add #ifdef __APPLE__ around the errno checking code but this should be good practice for non apple code as well.

I will remove debugging code in fbios master in another diff.

Reviewed By: djwatson

Differential Revision: D2580819

fb-gh-sync-id: 9162a3deba01af8b07cd2b336d7da3da040c67a9
folly/io/async/AsyncSSLSocket.cpp