Permalink
Browse files

remove shutdown call, set fd to -1 after close

  • Loading branch information...
1 parent 6d09348 commit 24ac04eb29b11db78fed235a47e5f3519e90f74e @brianmario brianmario committed Oct 30, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 ext/mysql2/client.c
View
@@ -409,8 +409,8 @@ static VALUE disconnect_and_raise(VALUE self, VALUE error) {
/* manually close the socket for read/write
this feels dirty, but is there another way? */
- shutdown(wrapper->client->net.fd, 2);
close(wrapper->client->net.fd);
+ wrapper->client->net.fd = -1;
rb_exc_raise(error);

0 comments on commit 24ac04e

Please sign in to comment.