Skip to content

Commit

Permalink
Close sockets if input is read.
Browse files Browse the repository at this point in the history
Solves #34
  • Loading branch information
LucaBernstein authored and xkonni committed Feb 25, 2020
1 parent 879d5f2 commit 1a33f88
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions daemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ int main(int argc, char* argv[]) {
error("ERROR writing to socket");
close(newsockfd);
}
shutdown(sockfd, SHUT_WR);
shutdown(newsockfd, SHUT_WR);
}

/**
Expand Down

0 comments on commit 1a33f88

Please sign in to comment.