Adjust AsyncServerSocket to not use getsockname before it's connected
authorOrvid King <blah38621@gmail.com>
Fri, 29 Jan 2016 22:37:19 +0000 (14:37 -0800)
committerfacebook-github-bot-4 <folly-bot@fb.com>
Fri, 29 Jan 2016 23:20:24 +0000 (15:20 -0800)
commit2a8d81aca18907b231071b154764686b89d20f99
tree739764113a3e0e82161756467de408d7fe63e6e6
parent6ea3164ec9ac72d6411abc4a08b1ba34b7550e50
Adjust AsyncServerSocket to not use getsockname before it's connected

Summary:
Winsock doesn't like it when you try to call getsockname on a socket that hasn't yet been connected or bound, because that socket doesn't have a name yet.
This only occurred because we were trying to get the family of the socket.
To solve this, I just passed the family in from the parent methods that already knew what the family was.

Reviewed By: yfeldblum

Differential Revision: D2871859

Pulled By: Orvid

fb-gh-sync-id: 7674f565a968aa0258355fc977c185a416e4fbe4
folly/io/async/AsyncServerSocket.cpp
folly/io/async/AsyncServerSocket.h