Explorar o código

updated init() to reset RemoteAddress (#49)

Solves issue #48 - Wrong remote IP address
Ray %!s(int64=8) %!d(string=hai) anos
pai
achega
4b244cc844
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      client.go

+ 1 - 0
client.go

@@ -138,6 +138,7 @@ func (c *client) init(conn net.Conn, clientID uint64) {
 	c.response = ""
 	c.Helo = ""
 	c.Header = nil
+	c.RemoteAddress = conn.RemoteAddr().String()
 }
 
 // getId returns the client's unique ID