Update server.js
Showing
1 changed file
with
2 additions
and
1 deletions
... | @@ -50,7 +50,7 @@ server.on("upgrade", async function(request, socket, head) { | ... | @@ -50,7 +50,7 @@ server.on("upgrade", async function(request, socket, head) { |
50 | gun.gun = new Gun({ | 50 | gun.gun = new Gun({ |
51 | peers: [], // should we use self as peer? | 51 | peers: [], // should we use self as peer? |
52 | localStorage: false, | 52 | localStorage: false, |
53 | file: false, // "tmp/" + pathname, | 53 | file: false, |
54 | radisk: false, | 54 | radisk: false, |
55 | multicast: false, | 55 | multicast: false, |
56 | ws: { noServer: true, path: pathname, web: gun.server }, | 56 | ws: { noServer: true, path: pathname, web: gun.server }, |
... | @@ -66,6 +66,7 @@ server.on("upgrade", async function(request, socket, head) { | ... | @@ -66,6 +66,7 @@ server.on("upgrade", async function(request, socket, head) { |
66 | gun.server.emit("connection", ws, request); | 66 | gun.server.emit("connection", ws, request); |
67 | }); | 67 | }); |
68 | } else { | 68 | } else { |
69 | if (debug) console.log("destroying socket", pathname); | ||
69 | socket.destroy(); | 70 | socket.destroy(); |
70 | } | 71 | } |
71 | }); | 72 | }); | ... | ... |
-
Please register or sign in to post a comment