Fix after #614 fix
This commit is contained in:
+2
-6
@@ -317,14 +317,10 @@ func (c *Client) GetImage(width, height int) ([]byte, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) LocalIP() string {
|
func (c *Client) LocalIP() string {
|
||||||
conn, ok := c.Conn.(*net.TCPConn)
|
if c.Conn == nil {
|
||||||
if !ok {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
addr, ok := conn.LocalAddr().(*net.TCPAddr)
|
|
||||||
if !ok {
|
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
addr := c.Conn.LocalAddr().(*net.TCPAddr)
|
||||||
return addr.IP.String()
|
return addr.IP.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user