From 841ee2bba4558a56ef8a60930e31349545aae388 Mon Sep 17 00:00:00 2001 From: Brian Lopez Date: Fri, 15 Oct 2010 22:37:51 -0700 Subject: [PATCH] make sure we invalidate the closed FD in case it's value is reused on a new connection --- ext/mysql2/client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/mysql2/client.c b/ext/mysql2/client.c index fdf55cd85..ef4ecc8c0 100644 --- a/ext/mysql2/client.c +++ b/ext/mysql2/client.c @@ -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); }