xmpp.js

changeset 19
998b0659c5f7
parent 17
701b83c8b687
--- a/xmpp.js	Mon Mar 01 15:52:39 2010 +0000
+++ b/xmpp.js	Fri Apr 16 23:05:06 2010 +0100
@@ -136,10 +136,12 @@
 		
 		var conn = this;
 
-        // Note that tcp.createConnection also initiates the connection.
-        // This doesn't appear to create problems with adding listeners
-        // afterward, but should be kept in mind should any arise.
-        this.socket = tcp.createConnection(this.port, this.host)
+        	// Note that tcp.createConnection also initiates the connection.
+        	// This doesn't appear to create problems with adding listeners
+        	// afterward, but should be kept in mind should any arise.
+        	this.socket = tcp.createConnection(this.port, this.host)
+        
+        	this.socket.setTimeout(0); // Because Node's default timeout is 60s
 
 		this.socket.addListener("connect", recontext(this, conn._socket_connected));
 		this.socket.addListener("disconnect", recontext(this, conn._socket_disconnected));

mercurial