diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-11 14:37:18 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-11 14:37:18 +0000 |
commit | 2a628fe11156ac1123e6402235f7667493d29607 (patch) | |
tree | 353c879475a4e80c88c8b53ba062f0467f4bb040 /win32 | |
parent | c6892791abb4ed873d05df4805954bb9a136bae2 (diff) |
* win32/win32.c (rb_w32_accept): commit miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c index f9333d0283..f2129afac8 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -2310,6 +2310,7 @@ rb_w32_accept(int s, struct sockaddr *addr, int *addrlen) MTHREAD_ONLY(EnterCriticalSection(&(_pioinfo(fd)->lock))); _set_osfhnd(fd, r); MTHREAD_ONLY(LeaveCriticalSection(&_pioinfo(fd)->lock)); + CloseHandle(h); st_insert(socklist, (st_data_t)r, (st_data_t)0); } else { @@ -2318,6 +2319,8 @@ rb_w32_accept(int s, struct sockaddr *addr, int *addrlen) fd = -1; } } + else + CloseHandle(h); }); return fd; } |