Skip to content

Commit

Permalink
server: Add missing Conn.reset call
Browse files Browse the repository at this point in the history
  • Loading branch information
foxcpp authored and emersion committed Nov 20, 2019
1 parent b42ac39 commit 73cd539
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,8 @@ func (c *Conn) handleData(arg string) {
// We have recipients, go to accept data
c.WriteResponse(354, EnhancedCode{2, 0, 0}, "Go ahead. End your data with <CR><LF>.<CR><LF>")

defer c.reset()

if c.server.LMTP {
c.handleDataLMTP()
return
Expand All @@ -498,7 +500,6 @@ func (c *Conn) handleData(arg string) {
io.Copy(ioutil.Discard, r) // Make sure all the data has been consumed
c.WriteResponse(code, enhancedCode, msg)

c.reset()
}

type statusCollector struct {
Expand Down

0 comments on commit 73cd539

Please sign in to comment.