I encountered a problem with Deno.connect() and graceful program exit (e.g. with a SIGINT signal handler). If the remote peer of a TCP connection does not answer the SYN, for example because it is filtered by a firewall, Deno awaits a connection timeout from the kernel which can be more than 2 minutes on default linux installations (based on /proc/sys/net/ipv4/tcp_syn_retries). Exiting with Deno.exit() is still possible, of course, but it skips any shutdown and abort handlers defined in the application.
Can Deno.connect() be adjusted to accept either an AbortSignal or a custom timeout value?
I encountered a problem with
Deno.connect()
and graceful program exit (e.g. with a SIGINT signal handler). If the remote peer of a TCP connection does not answer theSYN
, for example because it is filtered by a firewall, Deno awaits a connection timeout from the kernel which can be more than 2 minutes on default linux installations (based on/proc/sys/net/ipv4/tcp_syn_retries
). Exiting withDeno.exit()
is still possible, of course, but it skips any shutdown and abort handlers defined in the application.Can
Deno.connect()
be adjusted to accept either anAbortSignal
or a custom timeout value?