Merge pull request #833 from mrvn/pull_store-fd-on-connect

Store socket FD after connect
This commit is contained in:
Pieter Hintjens
2014-01-17 23:11:45 -08:00

View File

@@ -124,6 +124,9 @@ void zmq::tcp_connecter_t::out_event ()
tune_tcp_socket (fd);
tune_tcp_keepalives (fd, options.tcp_keepalive, options.tcp_keepalive_cnt, options.tcp_keepalive_idle, options.tcp_keepalive_intvl);
// remember our fd for ZMQ_SRCFD in messages
socket->set_fd(fd);
// Create the engine object for this connection.
stream_engine_t *engine = new (std::nothrow)
stream_engine_t (fd, options, endpoint);