make sure we invalidate the closed FD in case it's value is reused on a new connection

This commit is contained in:
Brian Lopez 2010-10-15 22:37:51 -07:00
parent 6e5cda6a52
commit 841ee2bba4
1 changed files with 1 additions and 0 deletions

View File

@ -144,6 +144,7 @@ static VALUE nogvl_close(void * ptr) {
if (!wrapper->closed) {
wrapper->closed = 1;
mysql_close(wrapper->client);
wrapper->client->net.fd = -1;
if (!wrapper->freed) {
free(wrapper->client);
}