Skip to content

Commit

Permalink
Local address not set correctly - Fixes issue vibe-d#961
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne Cimon committed Jan 21, 2015
1 parent 0e446df commit f96b4ca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/vibe/core/drivers/libasync.d
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,11 @@ final class LibasyncDriver : EventDriver {

enforce(conn.run(&tcp_connection.handler), "An error occured while starting a new connection: " ~ conn.error);

tcp_connection.m_tcpImpl.localAddr = conn.local;

while (!tcp_connection.connected) getDriverCore().yieldForEvent();



if (Task.getThis() != Task())
tcp_connection.releaseWriter();
return tcp_connection;
Expand Down Expand Up @@ -928,6 +931,7 @@ final class LibasyncTCPListener : TCPListener {

LibasyncTCPConnection native_conn = new LibasyncTCPConnection(conn, m_connectionCallback);
native_conn.m_tcpImpl.conn = conn;
native_conn.m_tcpImpl.localAddr = conn.local;
return &native_conn.handler;
}

Expand Down

0 comments on commit f96b4ca

Please sign in to comment.