sftp: log ip on inbound connection failure
This commit is contained in:
parent
d30ab7b9bd
commit
579278b4de
|
@ -107,7 +107,7 @@ func (c *SFTPServer) Run() error {
|
||||||
go func(conn net.Conn) {
|
go func(conn net.Conn) {
|
||||||
defer conn.Close()
|
defer conn.Close()
|
||||||
if err := c.AcceptInbound(conn, conf); err != nil {
|
if err := c.AcceptInbound(conn, conf); err != nil {
|
||||||
log.WithField("error", err).Error("sftp: failed to accept inbound connection")
|
log.WithField("error", err).WithField("ip", conn.RemoteAddr().String()).Error("sftp: failed to accept inbound connection")
|
||||||
}
|
}
|
||||||
}(conn)
|
}(conn)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user