diff --git a/p2p/transport/websocket/websocket.go b/p2p/transport/websocket/websocket.go index 5142ca97a1..36818decee 100644 --- a/p2p/transport/websocket/websocket.go +++ b/p2p/transport/websocket/websocket.go @@ -229,7 +229,11 @@ func (t *WebsocketTransport) maDial(ctx context.Context, raddr ma.Multiaddr) (ma } func (t *WebsocketTransport) maListen(a ma.Multiaddr) (manet.Listener, error) { - l, err := newListener(a, t.tlsConf) + var tlsConf *tls.Config + if t.tlsConf != nil { + tlsConf = t.tlsConf.Clone() + } + l, err := newListener(a, tlsConf) if err != nil { return nil, err }