Closed byplayer closed 10 years ago
I'm sorry, but I found bug. I close it.
No problem. Glad you got it resolved.
@byplayer - what was causing your bug? I'm having the same issue with the zlib warning and error...
In my case, I use Net::Scp with compress option and original file doesn't exist, zlib stream isn't closed. So, I try to close zlib stream, but it can't work properly.
So I try to find out zlib stream closing point.
By the way, I feel it is not good, zlib library print only stderr if it has warning, but I don't have good idea to know warning. Do you have good idea about it ? I want to send zlib patch to Ruby ML, if we find good way.
I was using Net::SCP with the compression option as well, and the issue seemed to only occur when transferring files from one specific machine (the other 28 machines in the cluster my program interacts with were just fine). I never ended up figuring out what was causing it, but it might be useful to know that conditions on the remote machine can be the cause of the error.
@qrohlf - I understood. In your case, it is useful to know notice and different from my case.
If scp error occur, "zlib(finalizer): the stream was freed prematurely." message print to stderr. I stop it.
Change point is as follows. close ssh channel before raise