mirror of
https://github.com/Yonle/bostr.git
synced 2025-03-18 05:42:03 +01:00
socket: use nodelay
Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
parent
70b9e9327a
commit
8b955f121f
@ -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;
|
||||
|
2
http.js
2
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) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user