[erlang-patches] Patch to fix ssh library

Niclas Eklund nick@REDACTED
Thu Nov 19 09:44:58 CET 2009


Hello!

Thanks for the patch! This issue has already been solved in a slightly 
different way in SSH-1.1.7, which will be included in R13B03.

Best regards,

/Niclas @ Erlang/OTP

On Wed, 18 Nov 2009, Kris Rasmussen wrote:

> I was noticing that when receiving large amounts of data the erlang SSH
> library would often freeze and no longer receive any data from the server I
> was connecting to. After a bit of work, I tracked this down to an "infinite"
> loop in ssh_connection_handler.erl. The problem occurs when the first block
> has not yet been decoded and a call to next_packet is made. This would
> trigger the process to send itself a socket-receive message but it's
> possible that there isn't additional data ready on the socket. I fixed this
> by adding a call to make the socket active again as is the case in the
> subsequent next_packet function definition when the decoded_data_buffer is
> not empty.
>
>> From my testing so far, this resolves the issue and I have not yet seen any
> other side effects. Please let me know what you think.
>
> I've attached my patch for R13B02, but you can also get it here:
> http://github.com/krisr/erlang-macports/raw/master/lang/erlang/files/patch-lib-ssh-src-ssh_connection_handler.erl.diff
>
> Best,
> Kris
>
> -- 
> Kris Rasmussen
> kris@REDACTED
>
> Twitter: http://twitter.com/aptana
> Facebook: http://aptana.com/facebook
>




More information about the erlang-patches mailing list