: <i>socket -async throws when the connect fails at once (illumos)</i> plus 8 other changes
by
.
D 2026-10-18T20:26:48.147
J assignee jan.nijtmans
J closedate 2461332.3519461458
J closer jan.nijtmans
J comment On\sillumos\s(OpenIndiana),\sa\snon-blocking\s<code>connect()</code>\sto\sa\slocal\sport\r\nwithout\sa\slistener\sfails\sat\sonce\swith\sECONNREFUSED\sinstead\sof\sEINPROGRESS.\sThen\r\n<code>socket\s-async</code>\sthrows\s<code>couldn't\sopen\ssocket:\sconnection\srefused</code>\r\ninstead\sof\sreturning\sa\schannel\swhich\sreports\sthe\sfailure\swith\r\n<code>fconfigure\s-error</code>\sand\sthe\swritable\sevent,\sas\ssocket(n)\sdescribes.\r\nThis\sfails\ssocket-14.2,\s14.7.2,\s14.8.2,\s14.11.0,\s14.12,\s14.14-14.18\sand\shttp-4.14.\r\n\r\nThis\swas\sseen\son\sSolaris\sbefore\s([3428754]:\stest\ssocket-14.2\swas\smade\sto\saccept\r\nthe\serror),\sbut\ssince\sthe\s2014\srework\sthe\stests\sexpect\sthe\serror\sto\sbe\sreported\r\nonly\sby\s<code>fconfigure\s-error</code>\s([42d50ebd0c]).\r\n\r\nProposed\sfix\sin\sbranch\s[/timeline?r=unix-async-connect-immediate-failure|unix-async-connect-immediate-failure]:\r\nan\sasync\sconnect\swhich\sfails\sat\sonce\sis\sreported\slike\sa\sfailure\sin\sthe\sbackground.\r\nsocket-14.11.1,\s14.16\sand\s14.17,\swhich\sneed\sthe\sconnect\sto\sbe\sstill\sin\sprogress,\r\nget\sa\snew\sconstraint\s<code>asyncConnectPending</code>.
J icomment Fixed\sin\s[trunk],\sbackported\sto\score-9-0-branch\r\n\r\nMany\sthanks!
J login jan.nijtmans
J mimetype text/x-fossil-wiki
J resolution Fixed
J status Closed
K 59e7e7fdfbcd8ee34a5a51a9a83990c7115ecc03
U jan.nijtmans
Z ac00928dba1a27d325a3c94da5993815