prevent a shutdown hang on non-matching TCP responses

Merged Evan Hunt requested to merge 3042-tcp-hang into main

When a non-matching DNS response is received by the resolver, it calls dns_dispatch_getnext() to resume reading. This is necessary for UDP but not for TCP, because TCP connections automatically resume reading after any response.

This MR adds a 'tcpreading' flag to TCP dispatches, so that dispatch_getnext() can be called multiple times without subsequent calls having any effect.

Closes #3042 (closed)

Edited by Evan Hunt

Merge request reports