changed errors even more.
This commit is contained in:
		
							parent
							
								
									4b9db320c0
								
							
						
					
					
						commit
						c2c7ed40d5
					
				| @ -154,16 +154,16 @@ module.exports.create = function (deps, config) { | ||||
|     } | ||||
|     conn.once('error', onError); | ||||
|     conn.once('data', function (chunk) { | ||||
|       //Adding this to track problems with error handling TODO: Remove this error handler.
 | ||||
|       conn.once('error', function(err) { | ||||
|         console.log("Received error in tcpHandler after removing error listener.", | ||||
|           "Number of errorListeners:", conn.listenerCount("error"), | ||||
|           "Error: ", err | ||||
|         ); | ||||
|         if(conn.listenerCount("error") <= 1) { | ||||
|           process.nextTick(function() {conn.emit("error", err);}); | ||||
|         } | ||||
|       }); | ||||
| //      //Adding this to track problems with error handling TODO: Remove this error handler.
 | ||||
| //      conn.once('error', function(err) {
 | ||||
| //        console.log("Received error in tcpHandler after removing error listener.",
 | ||||
| //          "Number of errorListeners:", conn.listenerCount("error"),
 | ||||
| //          "Error: ", err
 | ||||
| //        );
 | ||||
| //        if(conn.listenerCount("error") <= 1) {
 | ||||
| //          process.nextTick(function() {conn.emit("error", err);});
 | ||||
| //        }
 | ||||
| //      });
 | ||||
|       conn.removeListener('error', onError); | ||||
|       peek(conn, chunk, opts); | ||||
|     }); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user