Fix potential double close() on exception v2016.12.05.00
authorAmir Shalem <amirshalem@fb.com>
Sun, 4 Dec 2016 19:15:34 +0000 (11:15 -0800)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Sun, 4 Dec 2016 19:23:52 +0000 (11:23 -0800)
commitfae84c77f3cd88d9e7ccfc39a1fa04ad80f7f540
treec1292ae5cff3be8927695035a65f0033deb59b0c
parent42c5202563c9ba646ab852c5900978e56c711293
Fix potential double close() on exception

Summary:
Fix potential double close() on exception when SO_REUSEPORT fails.
The fd will be closed twice, once by close() and second by the scope guard above.

Reviewed By: yfeldblum

Differential Revision: D4272300

fbshipit-source-id: a163be822d7522cadb9dc3c3eddca10df453de14
folly/io/async/AsyncUDPSocket.cpp