Skip to content

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

Description

@baiguidong

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
}

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions