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

View File

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