@Adriaan

Well, at least I can reproduce the issue. On the sending side on Linux, the -N flag does the thing.

echo "Hello there" | nc machine.domain <port> -N -v 2>&1

When connecting to a remote host, and using strace -r -f netcat -k -l <port> , setting the -N flag results in

0.000596 read(4, "", 16308) = 0 0.000354 shutdown(4, SHUT_RD) = 0

Without the -N flag, listener remains listening, and hence not closing the connection. This is the last line then:

0.000404 poll([{fd=0, events=POLLIN}, {fd=4, events=0}, {fd=4, events=POLLIN}, {fd=1, events=0}], 4, -1

Next step is that I am going to look if I can change something on the listener side as well.

Greetz,

Adriaan