Merge pull request #112 from BenjaminSchaaf/socket-fix

Fix socket not being in a connected state after connectStream
This commit is contained in:
Sönke Ludwig 2019-08-17 14:44:48 +02:00 committed by GitHub
commit cf33c3d859
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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); } ();
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);
} else {
auto err = getSocketError();