From 8b2756caadf4b0fb6893fa8ccfbe3e8ce20c67a8 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 7 Jan 2024 06:49:27 -0500 Subject: [PATCH] fix: need to pass by ref --- net/net.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 {