diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-21 16:53:30 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-21 16:53:30 +0000 |
commit | 60f2cec6468bd4ce1d9821d851c9758b4299635c (patch) | |
tree | a4c45cbb37334e7eec97170f5cff5707f38eab99 /ext/socket/ancdata.c | |
parent | ad2f293d4fb1df2b78649e649feb41ed48913998 (diff) | |
download | ruby-60f2cec6468bd4ce1d9821d851c9758b4299635c.tar.gz |
* ext/socket/ancdata.c (bsock_recvmsg_internal): don't call
discard_cmsg_resource when EMFILE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/ancdata.c')
-rw-r--r-- | ext/socket/ancdata.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c index 5afd3d66e2..28f00649d7 100644 --- a/ext/socket/ancdata.c +++ b/ext/socket/ancdata.c @@ -1301,7 +1301,6 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock) if (errno == EMFILE && !gc_done) { /* SCM_RIGHTS hit the file descriptors limit, maybe. */ gc_and_retry: - discard_cmsg_resource(&mh); rb_gc(); gc_done = 1; goto retry; @@ -1323,8 +1322,10 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock) mh.msg_controllen < maxctllen - BIG_ENOUGH_SPACE) { /* there are big space bug truncated. * file descriptors limit? */ - if (!gc_done) + if (!gc_done) { + discard_cmsg_resource(&mh); goto gc_and_retry; + } } else { maxctllen *= 2; |