I don't think I've seen coveralls say anything but "coverage decreased (-0.0N%)" for any pull request, ever :( so I already kind of ignore it, sigh. Will dig sometime.
Confirmed that I can run this branch and it appears to fix the issue outlined in #354 using the provided use case, and continues to work OK with the gatewaying mentioned in #252 (which @lndbrg indicated may also have been related-ish to some of his changes).
I can also use this branch without any errors when running a nontrivial Fab task involving various run, sudo, put functions and a nontrivial amount of stdout/stderr streaming.
If the channel is closed the send method returs a response length of 0. This is not handled correctly by the packetizer and puts it in an infinite loop. (Fixes #156 for real :-) We make sure we don't do more than 10 iteration on a 0 length respose, but raise an EOFError.