infinite loop in write_all when closing socket

Bug #704440 reported by Osso
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
paramiko
New
Undecided
Unassigned

Bug Description

In packet.py, line 236, the function write_all loops on len(out).

On my laptop, when asking for a tunnel close (thus closing the socket)
while write_all is running, we can reach a situation where:
* n = self.__socket.send(out) sets n = 0
* socket.send is not sending a socket error even if the socket is closed
This step seems to be limited to mac os 10.5 as I haven't been able to reproduce it on linux
* self.__closed is only tested on socket timeout or error

I thereby suggest to change the test:
"if got timeout" at line 255 to "if got_timeout or self.__closed:" to test each time for a closed socket.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.