invalidate the file descriptor on close

This commit is contained in:
Brian Lopez 2010-07-28 11:31:32 -07:00
parent 9241f35df3
commit dd138de8e1
1 changed files with 3 additions and 1 deletions

View File

@ -88,7 +88,9 @@ static void rb_mysql_client_free(void * ptr) {
}
static VALUE nogvl_close(void * ptr) {
mysql_close((MYSQL *)ptr);
MYSQL *client = (MYSQL *)ptr;
mysql_close(client);
client->net.fd = -1;
return Qnil;
}