-
-
Save kanatohodets/6642786a927c2616f6f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I think this is trying to write to the socket after closing/freeing it. | |
# connect with netcat or something: nc localhost 3005 | |
react { | |
whenever IO::Socket::Async.listen('localhost', 3005) -> $sock { | |
start { | |
$sock.print("thank you for subscribing to CAT FACTS\n"); | |
$sock.close; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
changing the start block to this:
prevents me from reproducing the segfault, and judging by the
printf
debugging I did in Moar, allows uv_write to complete insrc/core/asyncsocket.c
. In the failure case,handle_data->handle
is NULL in the body ofwrite_setup
.