Skip to content
Browse files

Use close instead of shutdown to free fd

  • Loading branch information...
1 parent 7661872 commit a3efb615f82e48e789737ded2ea5de781f757f8c @cbascom cbascom committed May 30, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 beanstalk.c
View
4 beanstalk.c
@@ -72,15 +72,15 @@ int bs_connect(char *host, int port) {
freeaddrinfo(addr);
if (connect(fd, (struct sockaddr*)&server, sizeof(server)) != 0) {
- shutdown(fd, SHUT_RDWR);
+ close(fd);
return BS_STATUS_FAIL;
}
return fd;
}
int bs_disconnect(int fd) {
- shutdown(fd, SHUT_RDWR);
+ close(fd);
return BS_STATUS_OK;
}

0 comments on commit a3efb61

Please sign in to comment.
Something went wrong with that request. Please try again.