Disable Nagle's algorithm to try to make things more uniformly responsive.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3368 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2016-12-24 13:57:27 +00:00
parent 86ee9b1829
commit 4cdbdaf3d1
4 changed files with 21 additions and 0 deletions

View File

@ -403,6 +403,8 @@ function handleConnection(client) {
}
}
client.noDelay = true;
client.onError(function(error) {
logError(client.peerName + " - - [" + new Date() + "] " + error);
});

View File

@ -14,6 +14,7 @@ Connection.prototype.connect = function(host, port) {
let connection = this;
connection.close();
connection.socket = new Socket();
connection.socket.noDelay = true;
return connection.socket.connect(host, port).then(function() {
connection.buffer = "";
return Promise.all([