diff --git a/bouncer.js b/bouncer.js index a26d7e0..e7782a8 100644 --- a/bouncer.js +++ b/bouncer.js @@ -270,7 +270,8 @@ function newConn(addr, id) { const relay = new WebSocket(addr, { headers: { "User-Agent": "Bostr; The nostr relay bouncer; https://github.com/Yonle/bostr" - } + }, + noDelay: true }); relay.id = id; diff --git a/http.js b/http.js index 0ca0aad..26aa10a 100644 --- a/http.js +++ b/http.js @@ -9,7 +9,7 @@ const curD = _ => (new Date()).toLocaleString("ia"); const log = _ => console.log(process.pid, curD(), "-", _); // Server -const server = http.createServer() +const server = http.createServer({ noDelay: true }) const wss = new WebSocket.WebSocketServer({ noServer: true }); server.on('request', (req, res) => {