Fix socket not being in a connected state after connectStream

This commit is contained in:
Benjamin Schaaf 2019-07-17 23:12:59 +10:00
parent e7bf50ea2d
commit 472321f1f5

View file

@ -134,7 +134,7 @@ final class PosixEventDriverSockets(Loop : PosixEventLoop) : EventDriverSockets
auto ret = () @trusted { return connect(cast(sock_t)sock, address.name, address.nameLen); } (); auto ret = () @trusted { return connect(cast(sock_t)sock, address.name, address.nameLen); } ();
if (ret == 0) { if (ret == 0) {
m_loop.m_fds[sock].specific.state = ConnectionState.connected; m_loop.m_fds[sock].streamSocket.state = ConnectionState.connected;
on_connect(sock, ConnectStatus.connected); on_connect(sock, ConnectStatus.connected);
} else { } else {
auto err = getSocketError(); auto err = getSocketError();