diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-01-08 05:00:25 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-01-08 05:00:25 +0000 |
commit | a69b9bce318b3d4717b92a8747ecdb4e71585c5d (patch) | |
tree | f12f100a2b4900f3533586fa342cad65713f7855 /ext | |
parent | a3da8465b4406e01b9b597e0af81dad3f65c5528 (diff) | |
download | ruby-a69b9bce318b3d4717b92a8747ecdb4e71585c5d.tar.gz |
2000-01-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/socket/socket.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c index e8ceacf621..3605e991f0 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -92,10 +92,13 @@ static void sock_finalize(fptr) OpenFile *fptr; { - if (!fptr->f) return; + SOCKET s; + if (!fptr->f) return; + s = get_osfhandle(fileno(fptr->f)); myfdclose(fptr->f); - if(fptr->f2) myfdclose(fptr->f2); + if (fptr->f2) myfdclose(fptr->f2); + closesocket(s); } #endif |