Skip to content

Commit

Permalink
add TCP closing log
Browse files Browse the repository at this point in the history
  • Loading branch information
Dieterbe committed Oct 22, 2018
1 parent f610ccf commit 725f891
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions input/listen.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ func (l *Listener) acceptTcpConn(c net.Conn) {
}()

l.handler.Handle(NewTimeoutConn(c, l.readTimeout))
rAddr := c.RemoteAddr()
if rAddr != nil {
log.Infof("%v closing conn with %s", l.addr, rAddr)
}
c.Close()
}

Expand Down

0 comments on commit 725f891

Please sign in to comment.