From f74fc38eef5dc274d0d869fa4b6283d75959b947 Mon Sep 17 00:00:00 2001
From: mcmlxxix <>
Date: Thu, 9 Aug 2012 06:10:01 +0000
Subject: [PATCH] increase recvline() timeout to 30 seconds for you west
 coasties. log send errors. remove deuce's testes.

---
 exec/load/json-sock.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/exec/load/json-sock.js b/exec/load/json-sock.js
index 542b39c5ec..e3a7d95960 100644
--- a/exec/load/json-sock.js
+++ b/exec/load/json-sock.js
@@ -8,7 +8,7 @@ Socket.prototype.time_offset = 0;
 /* largest receivable packet */
 Socket.prototype.max_recv = 131072;
 /* timeout for socket.recvline() */
-Socket.prototype.recv_wait = 1;
+Socket.prototype.recv_wait = 30;
 /* last ping sent */
 Socket.prototype.ping_sent = 0;
 
@@ -16,7 +16,8 @@ Socket.prototype.ping_sent = 0;
 Socket.prototype.sendJSON = function(object) {
 	try {
 		var data=JSON.stringify(object,this.replacer,this.space)+"\r\n";
-		this.send(data); 
+		if(!this.send(data)) 
+			log(LOG_ERROR,"send failed: " + data);
 		log(LOG_DEBUG,"-->" + this.descriptor + ": " + data);
 	} catch(e) {
 		log(LOG_ERROR,e);
-- 
GitLab