mirror of
https://github.com/rclone/rclone.git
synced 2025-12-19 09:43:14 +00:00
Switch to using the dep tool and update all the dependencies
This commit is contained in:
10
vendor/github.com/pkg/sftp/conn.go
generated
vendored
10
vendor/github.com/pkg/sftp/conn.go
generated
vendored
@@ -56,9 +56,9 @@ func (c *clientConn) loop() {
|
||||
// appropriate channel.
|
||||
func (c *clientConn) recv() error {
|
||||
defer func() {
|
||||
c.Lock()
|
||||
c.conn.Lock()
|
||||
c.conn.Close()
|
||||
c.Unlock()
|
||||
c.conn.Unlock()
|
||||
}()
|
||||
for {
|
||||
typ, data, err := c.recvPacket()
|
||||
@@ -102,11 +102,13 @@ func (c *clientConn) sendPacket(p idmarshaler) (byte, []byte, error) {
|
||||
func (c *clientConn) dispatchRequest(ch chan<- result, p idmarshaler) {
|
||||
c.Lock()
|
||||
c.inflight[p.id()] = ch
|
||||
c.Unlock()
|
||||
if err := c.conn.sendPacket(p); err != nil {
|
||||
c.Lock()
|
||||
delete(c.inflight, p.id())
|
||||
c.Unlock()
|
||||
ch <- result{err: err}
|
||||
}
|
||||
c.Unlock()
|
||||
}
|
||||
|
||||
// broadcastErr sends an error to all goroutines waiting for a response.
|
||||
@@ -126,6 +128,6 @@ type serverConn struct {
|
||||
conn
|
||||
}
|
||||
|
||||
func (s *serverConn) sendError(p id, err error) error {
|
||||
func (s *serverConn) sendError(p ider, err error) error {
|
||||
return s.sendPacket(statusFromError(p, err))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user