Closed dmathieu closed 7 years ago
Thanks for the patch, and sorry for my delay in responding to it.
This is very interesting, and looks like it is related to https://github.com/bnix/double-bag-ftps/pull/1/commits/043ba70309ed622302d3aa5c6f3169872d1211ca . This gem forces Ruby's ftp library to work with OpenSSL sockets, but those sockets lack some methods, such as #read_timeout=
, that Ruby's ftp library reasonably expects a socket to have. That patch adds those methods right after OpenSSL makes the socket.
Your patch is probably fine, but I want to understand what's happening before merging it.
By the way: Do we have a code example that reproduces this?
Hey,
I haven't experienced this myself. But I have a stacktrace and description here: dmathieu/glynn/issues/64
Merged... thanks!
If an error occured causing the connection to not be opened, this close will trigger an additional exception, as we can't close a closed socket.
This change makes sure we only close connections if they are open.