fix: need to pass by ref
This commit is contained in:
parent
0028483817
commit
8b2756caad
|
@ -25,8 +25,8 @@ var (
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
transports = sync.Map{}
|
transports = sync.Map{}
|
||||||
RegisterTransport("ws", WebSocketPeer{})
|
RegisterTransport("ws", &WebSocketPeer{})
|
||||||
RegisterTransport("wss", WebSocketPeer{})
|
RegisterTransport("wss", &WebSocketPeer{})
|
||||||
}
|
}
|
||||||
func RegisterTransport(peerType string, factory interface{}) {
|
func RegisterTransport(peerType string, factory interface{}) {
|
||||||
if _, ok := factory.(PeerFactory); !ok {
|
if _, ok := factory.(PeerFactory); !ok {
|
||||||
|
|
Loading…
Reference in New Issue