Skip to content

Correctly set TCP_NODELAY in open-{client,server}-stream

username-removed-975496 requested to merge (removed):develop into develop

Here are a couple of commits which fix the setting of TCP_NODELAY on sockets created by open-client-stream and open-server-stream.

First, netinet/tcp.h needs to be included so TCP_* are actually defined. Second, an uninitialized variable was being used to set these options, so if the variable happened to hold 0 then the option would not be set (this happened regularly on my OpenBSD box). Now the variables are initialized to 1.

Tested on OpenBSD and Linux.

Merge request reports