10 Jul
2012
10 Jul
'12
1:51 p.m.
Dear Fabian! The problem appears with "classical" mapi2.py when server drops the connection without closing it correctly. This happens with some incorrect SQLs (sometimes error diagnostics simply fails). recv(bytes) hangs in this case. I have faced this problem before with sockets, and the only solution I know so far is select() method. I raise socket.error only in the case of such hard connection failure. So it does not seem too harsh. At least it is better than thread-blocking. Regards, Alexey Mints