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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user