Unverified Commit 546f8e72 authored by Luca Boccassi's avatar Luca Boccassi Committed by GitHub

Merge pull request #3334 from jacquesg/nodelay-after-connect

TCP_NODELAY is set prior to connecting
parents cfbbfb8a 9d8c2b38
# Permission to Relicense under MPLv2 or any other OSI approved license chosen by the current ZeroMQ BDFL
This is a statement by Jacques Germishuys that grants permission to
relicense its copyrights in the libzmq C++ library (ZeroMQ) under the
Mozilla Public License v2 (MPLv2) or any other Open Source Initiative
approved license chosen by the current ZeroMQ BDFL (Benevolent
Dictator for Life).
A portion of the commits made by the Github handle "jacquesg", with
commit author "Jacques Germishuys <jacquesg@striata.com>", are
copyright of Jacques Germishuys. This document hereby grants the libzmq
project team to relicense libzmq, including all past, present and
future contributions of the author listed above.
Jacques Germishuys
2018/12/14
......@@ -436,9 +436,6 @@ int zmq::make_fdpair (fd_t *r_, fd_t *w_)
*w_ = open_socket (AF_INET, SOCK_STREAM, 0);
wsa_assert (*w_ != INVALID_SOCKET);
// Set TCP_NODELAY on writer socket.
tune_socket (*w_);
if (sync != NULL) {
// Enter the critical section.
DWORD dwrc = WaitForSingleObject (sync, INFINITE);
......@@ -465,6 +462,9 @@ int zmq::make_fdpair (fd_t *r_, fd_t *w_)
rc = connect (*w_, reinterpret_cast<struct sockaddr *> (&addr),
sizeof addr);
// Set TCP_NODELAY on writer socket.
tune_socket (*w_);
// Accept connection from writer.
if (rc != SOCKET_ERROR)
*r_ = accept (listener, NULL, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment