Message125897
Precisely, I traced down the problem by putting a simple "breakpoint"
in asyncore.py:
def poll(timeout=0.0, map=None):
if map is None:
map = socket_map
if map:
r = []; w = []; e = []
for fd, obj in map.items():
is_r = obj.readable()
print "Readable??? -->" , is_r
is_w = obj.writable()
if is_r:
r.append(fd)
if is_w:
w.append(fd)
if is_r or is_w:
e.append(fd)
if [] == r == w == e:
time.sleep(timeout)
return
print r,w,e
try:
r, w, e = select.select(r, w, e, timeout)
except select.error, err:
if err.args[0] != EINTR:
raise
else:
return
And here it comes:
[5] [5] [5]
Readable??? --> True
[5] [5] [5]
Readable??? --> True
[5] [5] [5]
Readable??? --> False
[] [5] [5]
Traceback (most recent call last):
File "./dlms_client.py", line 136, in <module>
asyncore.loop(timeout=0.8)
File "/usr/lib/python2.6/asyncore.py", line 213, in loop
poll_fun(timeout)
File "/usr/lib/python2.6/asyncore.py", line 146, in poll
raise
File "/usr/lib/python2.6/asyncore.py", line 143, in poll
r, w, e = select.select(r, w, e, timeout)
select.error: (9, 'Bad file descriptor')
So, in order this to work, on first sight all r,w,e must not point to
a socket that has been already closed. Now I am going to think for a workaround at least. |
|
Date |
User |
Action |
Args |
2011-01-10 11:44:37 | tgeorgiev | set | recipients:
+ tgeorgiev, giampaolo.rodola |
2011-01-10 11:44:37 | tgeorgiev | set | messageid: <1294659877.06.0.707006492266.issue10878@psf.upfronthosting.co.za> |
2011-01-10 11:44:31 | tgeorgiev | link | issue10878 messages |
2011-01-10 11:44:31 | tgeorgiev | create | |
|