Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

出错的时候,数据连接没有关闭 #46

Open
baiguidong opened this issue Nov 29, 2019 · 1 comment
Open

出错的时候,数据连接没有关闭 #46

baiguidong opened this issue Nov 29, 2019 · 1 comment

Comments

@baiguidong
Copy link

connGetter, err := pconn.prepareDataConn()
if err != nil {
pconn.debug("error preparing data connection: %s", err)
return 0, err
}

var cmd string
if dest == nil && src != nil {
	cmd = "STOR"
} else if dest != nil && src == nil {
	cmd = "RETR"
} else {
	panic("this shouldn't happen")
}

err = pconn.sendCommandExpected(replyGroupPreliminaryReply, "%s %s", cmd, path)
if err != nil {
	return 0, err

--------------------------------->>
}

dc, err := connGetter()
if err != nil {
	pconn.debug("error getting data connection: %s", err)
	return 0, err
}

出错的时候,数据连接没有关闭

@baiguidong
Copy link
Author

The data connection was not closed when an error occurred

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant