Re: [MonetDB-users] MonetDB Python client
Hi, Fabian! Yeh, I have shifted try outside of loop. I am not a big expert in this, but does it make any difference? Alexey.
On 05-07-2012 11:43:11 +0200, Alexey Mints wrote:
Hi, Fabian! Yeh, I have shifted try outside of loop. I am not a big expert in this, but does it make any difference?
Well, no. I think you also got the diff in the wrong order. I looked at it some more now, and I think it doesn't make sense. recv() should IMO break when the connection is closed. The select should return the socket when it is closed, so recv still handles that. You just introduced an extra loop for select, followed by recv. Concluding, I think the only real "fix" you introduced is the check if what you read happened to be empty. If so, you raise a socket.error, which may be a bit harsh thing to do. Fabian
participants (2)
-
Alexey Mints
-
Fabian Groffen