mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-23 15:37:01 +00:00
Add missing Close calls
The SMTP courier was not properly closing the connection, and chasquid's closing of incoming connections was not ideal (it was closing the underlying one, not necessarily the active one, like in the case of a jump to TLS). This patch fixes both by adding the missing calls to Close.
This commit is contained in:
@@ -445,8 +445,12 @@ type Conn struct {
|
||||
commandTimeout time.Duration
|
||||
}
|
||||
|
||||
func (c *Conn) Close() {
|
||||
c.netconn.Close()
|
||||
}
|
||||
|
||||
func (c *Conn) Handle() {
|
||||
defer c.netconn.Close()
|
||||
defer c.Close()
|
||||
|
||||
c.tr = trace.New("SMTP.Conn", c.netconn.RemoteAddr().String())
|
||||
defer c.tr.Finish()
|
||||
|
||||
Reference in New Issue
Block a user