remove cabblack invocation

This commit is contained in:
Boris-Barboris 2017-11-11 15:44:13 +00:00
parent 0cac9d56e0
commit 36b0413d32
2 changed files with 1 additions and 5 deletions

View file

@ -557,8 +557,7 @@ enum ConnectStatus {
refused,
timeout,
bindFailure,
unknownError,
cancelled
unknownError
}
enum ConnectionState {

View file

@ -129,13 +129,10 @@ final class PosixEventDriverSockets(Loop : PosixEventLoop) : EventDriverSockets
assert(state == ConnectionState.connecting,
"Unable to cancel connect on the socket that is not in connecting state");
state = ConnectionState.closed;
auto cb = connectCallback;
connectCallback = null;
m_loop.clearFD(sock);
m_loop.unregisterFD(sock, EventMask.read|EventMask.write|EventMask.status);
closeSocket(cast(sock_t)sock.value);
if (cb)
cb(StreamSocketFD.invalid, ConnectStatus.cancelled);
}
}