[macruby-changes] [4590] MacRuby/trunk/ext/socket/socket.c
source_changes at macosforge.org
source_changes at macosforge.org
Thu Oct 7 22:19:27 PDT 2010
Revision: 4590
http://trac.macosforge.org/projects/ruby/changeset/4590
Author: lsansonetti at apple.com
Date: 2010-10-07 22:19:24 -0700 (Thu, 07 Oct 2010)
Log Message:
-----------
fix a bug in BasicSocket#close_{read,write} where the actual fd would be left intact
Modified Paths:
--------------
MacRuby/trunk/ext/socket/socket.c
Modified: MacRuby/trunk/ext/socket/socket.c
===================================================================
--- MacRuby/trunk/ext/socket/socket.c 2010-10-08 02:12:41 UTC (rev 4589)
+++ MacRuby/trunk/ext/socket/socket.c 2010-10-08 05:19:24 UTC (rev 4590)
@@ -303,6 +303,7 @@
return rb_io_close(sock);
}
fptr->mode &= ~FMODE_READABLE;
+ fptr->read_fd = -1;
return Qnil;
}
@@ -321,6 +322,7 @@
}
shutdown(fptr->fd, 1);
fptr->mode &= ~FMODE_WRITABLE;
+ fptr->write_fd = -1;
return Qnil;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101007/935bd228/attachment.html>
More information about the macruby-changes
mailing list