diff --git a/net/net.go b/net/net.go index 865ae42..3f2174c 100644 --- a/net/net.go +++ b/net/net.go @@ -25,8 +25,8 @@ var ( func init() { transports = sync.Map{} - RegisterTransport("ws", WebSocketPeer{}) - RegisterTransport("wss", WebSocketPeer{}) + RegisterTransport("ws", &WebSocketPeer{}) + RegisterTransport("wss", &WebSocketPeer{}) } func RegisterTransport(peerType string, factory interface{}) { if _, ok := factory.(PeerFactory); !ok {