ftp
ftp copied to clipboard
An existing connection was forcibly closed by the remote host
I create a FTP connection using below codes.
import "github.com/jlaffaye/ftp"
conn, err := ftp.Dial("IP:21", ftp.DialWithTimeout(5*time.Second))
Someting is right and I can use the conn to access FTP server. But after about one minute, I access the FTP server again and got the error msg "An existing connection was forcibly closed by the remote host".
How to solve this problem? Who can help me, thx.