Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis
Created August 22, 2012 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bnoordhuis/79bded5c3bee9632d9b5 to your computer and use it in GitHub Desktop.
Save bnoordhuis/79bded5c3bee9632d9b5 to your computer and use it in GitHub Desktop.
diff --git a/test/test-poll.c b/test/test-poll.c
index 5a20b9d..eb0aa5d 100644
--- a/test/test-poll.c
+++ b/test/test-poll.c
@@ -394,8 +394,8 @@ static void connection_poll_cb(uv_poll_t* handle, int status, int events) {
if (context->got_fin && context->sent_fin) {
/* Sent and received FIN. Close and destroy context. */
- close_socket(context->sock);
destroy_connection_context(context);
+ close_socket(context->sock);
context->events = 0;
} else if (new_events != context->events) {
@@ -489,8 +489,8 @@ static void server_poll_cb(uv_poll_t* handle, int status, int events) {
ASSERT(r == 0);
if (++server_context->connections == NUM_CLIENTS) {
- close_socket(server_context->sock);
destroy_server_context(server_context);
+ close_socket(server_context->sock);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment