mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
Merge pull request #930 from lmangani/patch-1
Allow externally provided websockets in constructor
This commit is contained in:
commit
5bedffc864
@ -19,7 +19,7 @@ Gun.on('opt', function mount(ctx){
|
||||
ws.server = ws.server || opt.web;
|
||||
ws.path = ws.path || '/gun';
|
||||
|
||||
ws.web = new WebSocket.Server(ws);
|
||||
if (!ws.web) ws.web = new WebSocket.Server(ws);
|
||||
|
||||
ws.web.on('connection', function(wire){
|
||||
wire.upgradeReq = wire.upgradeReq || {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user