]> git.gir.st - ircpipe.git/commit
implement socket timeout on connect
authorTobias Girstmair <t@thi3nkpad.localdomain>
Mon, 20 May 2024 15:44:30 +0000 (17:44 +0200)
committerTobias Girstmair <t@thi3nkpad.localdomain>
Mon, 20 May 2024 15:44:30 +0000 (17:44 +0200)
commitcbbad9ba584d4b0828ad71cac54bd1ed150a4c56
treec786025e5ac6543a229a8b8a0164a50afd7ca266
parent0fd743146da29cf9379a58ab64e79c5f3b0b5248
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