Ticket #134 (new defect)

Opened 1 month ago

Last modified 3 weeks ago

sockets are not being closed by EventableDescriptor::Close() under windows

Reported by: scott@rightscale.com Assigned to:
Priority: major Milestone:
Keywords: Cc:


The problem is that the EventableDescriptor::Close() method uses closesocket (MySocket?); instead of close (MySocket?) which is #defined to call rb_w32_close(). The closesocket() call maps to the winsock API which expects a real socket handle. the MySocket? value is *NOT* a real socket handle and so the closesocket call fails. The result is that all EM sockets are left open in windows. There are also several other cases of closesocket being called incorrectly in em.cpp and ed.cpp

See the attached unit test which demonstrates the failure. See the remarks at the bottom of the test class.


test_multiple_connect_send.rb (3.2 kB) - added by scott@rightscale.com on 11/20/09 19:34:46.
unit test to demonstrate failure to close listener socket

Change History

11/20/09 19:34:46 changed by scott@rightscale.com

  • attachment test_multiple_connect_send.rb added.

unit test to demonstrate failure to close listener socket

11/25/09 02:49:02 changed by tmm1

This is only an issue with ruby 1.9 correct?