Skip to content
Permalink
Browse files Browse the repository at this point in the history
fix potential infinite loops in both LocalAddr and RemoteAddr
  • Loading branch information
dajohi committed Aug 8, 2013
1 parent 6dca703 commit 233bccb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conn.go
Expand Up @@ -31,14 +31,14 @@ func (c *proxiedConn) LocalAddr() net.Addr {
if c.boundAddr != nil {
return c.boundAddr
}
return c.LocalAddr()
return c.conn.LocalAddr()
}

func (c *proxiedConn) RemoteAddr() net.Addr {
if c.remoteAddr != nil {
return c.remoteAddr
}
return c.RemoteAddr()
return c.conn.RemoteAddr()
}

func (c *proxiedConn) SetDeadline(t time.Time) error {
Expand Down

0 comments on commit 233bccb

Please sign in to comment.