[IronPython] Socket's life after close()

Haibo Luo haiboluo at exchange.microsoft.com
Fri Jan 19 08:24:29 CET 2007


This might be related to our lack of nt.dup(). I filed a new bug (http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=7451) to track this.

Sorry, we missed the comment left by amecha in codeplex. If you see any bug has not been fixed, please do not hesitate to re-activate it or send email to this list.

A temp solution is: do not close the socket even after calling makefile.

Btw, with the current makefile, ~70% of test_socket.py pass. test_urllib.py and test_urllibnet.py pass with few-line change.

Thanks for telling us know this.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo
Sent: Thursday, January 18, 2007 10:48 PM
To: Discussion of IronPython
Subject: [IronPython] Socket's life after close()

Issue #1368 is closed, but its primary use case is still broken. Have
you tested with original poster's test case, urllib.urlopen()?

amecha commented on Jan 10 about this closed issue stating that it is
still broken and I can confirm. (btw, shouldn't the original poster be
able to re-open the bug?)

Here is a simplifed test case since urllib.urlopen() calls hosts of
other functions that simply obscures the root cause. The test assumes
that echo service is enabled on the localhost.

# test.py
import socket
s = socket.socket()
s.connect(('127.0.0.1', 7))
s.send('test')
f = s.makefile()
s.close()
print f.read(4)

Python can read fine after socket close(), but IronPython complains.

--
Seo Sanghyeon
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list