Fix apple bug around TFO writes
authorSubodh Iyengar <subodh@fb.com>
Thu, 29 Sep 2016 13:42:11 +0000 (06:42 -0700)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Thu, 29 Sep 2016 13:53:38 +0000 (06:53 -0700)
commit546ea578cfbf7b4754669a089109378aa5814331
tree107a7cd70e891049e7ced86721917a7d47fb0ab3
parentedbb8ae97159a46a52bff13b1ecb5527a4153e33
Fix apple bug around TFO writes

Summary:
When using connectx to do TFO, apple has a bug
where the second write after a TFO write will cause
the socket to throw an ENOTCONN error instead of an
EAGAIN. Linux handles this case fine and returns an
EAGAIN, however apple returns ENOTCONN.

We solve this by treating ENOTCONN as an EAGAIN temporarily.

Reviewed By: yfeldblum

Differential Revision: D3942681

fbshipit-source-id: ab4f0b5fd6cdcfe9c584ea00849705a2d739d65f
folly/io/async/AsyncSocket.cpp