diff --git a/connection.go b/connection.go index 076c1ded..8d90d1e7 100644 --- a/connection.go +++ b/connection.go @@ -281,10 +281,11 @@ func (ch *Channel) newConnection(conn net.Conn, outboundHP string, remotePeer Pe c.relay = NewRelayer(ch, c) } - go c.readFrames(connID) - go c.writeFrames(connID) // Connections are activated as soon as they are created. c.callOnActive() + + go c.readFrames(connID) + go c.writeFrames(connID) return c }