mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
parent
985cfa2b4d
commit
284a028e1c
2
gun.js
2
gun.js
@ -2404,7 +2404,7 @@
|
||||
mesh.wire = opt.wire = open;
|
||||
function open(peer){ try{
|
||||
if(!peer || !peer.url){ return wire && wire(peer) }
|
||||
var url = peer.url.replace('http', 'ws');
|
||||
var url = peer.url.replace(/^http/, 'ws');
|
||||
var wire = peer.wire = new opt.WebSocket(url);
|
||||
wire.onclose = function(){
|
||||
opt.mesh.bye(peer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user