add remote address to transfer and commands logs

This commit is contained in:
Nicola Murino
2021-06-01 22:28:43 +02:00
parent 969c992bfd
commit 575bcf1f03
22 changed files with 134 additions and 122 deletions

View File

@@ -33,6 +33,9 @@ func (c *Connection) GetClientVersion() string {
// GetRemoteAddress return the connected client's address
func (c *Connection) GetRemoteAddress() string {
if c.RemoteAddr == nil {
return ""
}
return c.RemoteAddr.String()
}