]> git.gir.st - ircpipe.git/commit
implement socket timeout on connect
authorTobias Girstmair <tobi@isticktoit.net>
Mon, 20 May 2024 15:44:30 +0000 (17:44 +0200)
committerTobias Girstmair <tobi@isticktoit.net>
Mon, 20 May 2024 15:44:30 +0000 (17:44 +0200)
commit86c118e373a1a040b1f5903ac0cfc57f2ea48974
treec786025e5ac6543a229a8b8a0164a50afd7ca266
parente0311dff404859be4c3c3b2f9e1ee5a74995f5ea
implement socket timeout on connect

before this, we could have hung connecting to unavailable servers for
essentially ever. we only set SO_SNDTIMEO (not SO_RCVTIMEO) as we only
care when packets we send don't get ACKed in time (more specifically, we
only care about the server ACKing our initial SYN), not when the server
stops sending data for a while (the latter we handle using PING/PONG
ourselves).

c.f. https://stackoverflow.com/a/4182564. should cause EINPROGRESS for
connect(2), EAGAIN or EWOULDBLOCK otherwise.
ircpipe.c
Imprint / Impressum