vendor: update github.com/goftp/server - fixes #2845
This commit is contained in:
+13
-2
@@ -14,6 +14,7 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
|
||||
// DataSocket describes a data socket is used to send non-control data between the client and
|
||||
@@ -208,13 +209,23 @@ func (socket *ftpPassiveSocket) GoListenAndServe(sessionID string) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
var listener net.Listener
|
||||
listener, err = net.ListenTCP("tcp", laddr)
|
||||
var tcplistener *net.TCPListener
|
||||
tcplistener, err = net.ListenTCP("tcp", laddr)
|
||||
if err != nil {
|
||||
socket.logger.Print(sessionID, err)
|
||||
return
|
||||
}
|
||||
|
||||
// The timeout, for a remote client to establish connection
|
||||
// with a PASV style data connection.
|
||||
const acceptTimeout = 60 * time.Second
|
||||
err = tcplistener.SetDeadline(time.Now().Add(acceptTimeout))
|
||||
if err != nil {
|
||||
socket.logger.Print(sessionID, err)
|
||||
return
|
||||
}
|
||||
|
||||
var listener net.Listener = tcplistener
|
||||
add := listener.Addr()
|
||||
parts := strings.Split(add.String(), ":")
|
||||
port, err := strconv.Atoi(parts[len(parts)-1])
|
||||
|
||||
Vendored
+1
-1
@@ -83,7 +83,7 @@ github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/seen_state
|
||||
github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_common
|
||||
github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies
|
||||
github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users_common
|
||||
# github.com/goftp/server v0.0.0-20180914132916-1fd52c8552f1
|
||||
# github.com/goftp/server v0.0.0-20190111142836-88de73f463af
|
||||
github.com/goftp/server
|
||||
# github.com/golang/protobuf v1.2.0
|
||||
github.com/golang/protobuf/proto
|
||||
|
||||
Reference in New Issue
Block a user