commit | 49488377fa2f14143ba3067cf7555f60f6c7b550 | [log] [tgz] |
---|---|---|
author | John Eikenberry <jae@zhar.net> | Thu Mar 15 13:46:20 2018 -0700 |
committer | John Eikenberry <jae@zhar.net> | Thu Mar 15 13:53:30 2018 -0700 |
tree | 9d6896bac944b9e3ab3528e1fb9454ee97aef066 | |
parent | 68e5d2f242e627cec28649e9a5e6c6e93b9655fd [diff] |
fix client deadlock on server death during writes Fixes #234 Similar to #181 (which was about read methods), the client deadlocks on server drop on write methods (Write/ReadFrom). This is another case of broadcastErr() and dispatchRequest() deadlocking. The fix is to bump up the channel used to communicate about inflight packets to maxConcurrentRequests+1 (+1 is new). It seems that it can have the full set of packets going and hit the error (triggering broadcastErr) yet it still tries to call dispatchRequest again. More details in that ticket. I'm also bumping up the chan buffer in the read methods to keep them consistent. I can't reproduce the problem, but it looks like it should have it. So it might just be a much harder race to trigger. This also includes 2 tests which reprocuded the issue for ReadFrom and Write.
The sftp
package provides support for file system operations on remote ssh servers using the SFTP subsystem. It also implements an SFTP server for serving files from the filesystem.
See godoc.org/github.com/pkg/sftp for examples and usage.
The basic operation of the package mirrors the facilities of the os package.
The Walker interface for directory traversal is heavily inspired by Keith Rarick's fs package.
We welcome pull requests, bug fixes and issue reports.
Before proposing a large change, first please discuss your change by raising an issue.
For API/code bugs, please include a small, self contained code example to reproduce the issue. For pull requests, remember test coverage.
We try to handle issues and pull requests with a 0 open philosophy. That means we will try to address the submission as soon as possible and will work toward a resolution. If progress can no longer be made (eg. unreproducible bug) or stops (eg. unresponsive submitter), we will close the bug.
Thanks.