Skip to content
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.

Commit

Permalink
close the master process socket fd (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
wxd237 authored and nikhilm committed Mar 16, 2017
1 parent c2f3191 commit 99fc7fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/multi-echo-server/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ void on_new_connection(uv_stream_t *server, int status) {
struct child_worker *worker = &workers[round_robin_counter];
uv_write2(write_req, (uv_stream_t*) &worker->pipe, &dummy_buf, 1, (uv_stream_t*) client, NULL);
round_robin_counter = (round_robin_counter + 1) % child_worker_count;

}
else {
uv_close((uv_handle_t*) client, NULL);
}
uv_close((uv_handle_t*) client, NULL);

}

void setup_workers() {
Expand Down

0 comments on commit 99fc7fd

Please sign in to comment.