Handle multi-line 226 status code
This commit is contained in:
parent
7a3697af8c
commit
fb61796944
2
ftp.go
2
ftp.go
@ -483,7 +483,7 @@ func (r *response) Read(buf []byte) (int, error) {
|
||||
// Close implements the io.Closer interface on a FTP data connection.
|
||||
func (r *response) Close() error {
|
||||
err := r.conn.Close()
|
||||
_, _, err2 := r.c.conn.ReadCodeLine(StatusClosingDataConnection)
|
||||
_, _, err2 := r.c.conn.ReadResponse(StatusClosingDataConnection)
|
||||
if err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user