Commit 9cdc9990 authored by Orvid King's avatar Orvid King Committed by Facebook Github Bot

Convert calls to the fd overload of EventHandler::changeHandlerFD to the NetworkSocket overload

Summary: The fd overload is going to be removed.

Reviewed By: yfeldblum

Differential Revision: D13478000

fbshipit-source-id: d45c5d7c0dbcbde31976ff5dc48d1abc97d5a743
parent 41128f79
......@@ -43,7 +43,7 @@ void AsyncPipeReader::failRead(const AsyncSocketException& ex) {
void AsyncPipeReader::close() {
unregisterHandler();
if (fd_ >= 0) {
changeHandlerFD(-1);
changeHandlerFD(folly::NetworkSocket::fromFd(-1));
if (closeCb_) {
closeCb_(fd_);
......@@ -192,7 +192,7 @@ void AsyncPipeWriter::closeNow() {
}
if (fd_ >= 0) {
unregisterHandler();
changeHandlerFD(-1);
changeHandlerFD(folly::NetworkSocket::fromFd(-1));
if (closeCb_) {
closeCb_(fd_);
} else {
......
......@@ -394,7 +394,7 @@ int AsyncSocket::detachFd() {
closeNow();
// Update the EventHandler to stop using this fd.
// This can only be done after closeNow() unregisters the handler.
ioHandler_.changeHandlerFD(-1);
ioHandler_.changeHandlerFD(folly::NetworkSocket::fromFd(-1));
return fd.toFd();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment