1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-28 14:17:42 +00:00

added deferred closing of streams after async connect() fails

This commit is contained in:
Ico Doornekamp
2023-05-18 14:09:06 +02:00
parent 8d78fb1f6b
commit c3e28bc924
3 changed files with 21 additions and 3 deletions

View File

@@ -480,7 +480,7 @@ JANET_CORE_FN(cfun_net_connect,
/* Wrap socket in abstract type JanetStream */
JanetStream *stream = make_stream(sock, JANET_STREAM_READABLE | JANET_STREAM_WRITABLE);
/* Set the socket to non-blocking mode */
/* Set up the socket for non-blocking IO before connecting */
janet_net_socknoblock(sock);
/* Connect to socket */