fix: transition io to closed on connect timeout to prevent term loop

a bug was introduced during the fiber scheduler integration work for 1.8.0, where touching a connection used across fibers relied on states being fluid during IO calls. this escalated poorly to when a connection, on connect timeout, never moves the socket from idle, which is then interpreted, during the termination as another fiber having picked it up; and later on, because it's socket is idle, the connection doesn't transition to closed, which blocks the termination loop of the selector/session. even more sadly, the existing test for connect timeout relies on a socket being connectable, timing it out only during the transition to a tls socket, so the non-routeable case was never covered.

this is now fixed by force-transitioning idle sockets to closed. this fixes the immediate issue, while keeping the semantics for fiber schedulers, as this forceful transition happens without any IO op in the middle. this is made at the expense of bypassing the state machine transition API, which doesn't please me much.

Closes #387 (closed)

Merge request reports

Loading