changed errors a bit.
This commit is contained in:
		
							parent
							
								
									089d85df67
								
							
						
					
					
						commit
						9eb96be46c
					
				| @ -155,11 +155,12 @@ module.exports.create = function (deps, config) { | |||||||
|     conn.once('error', onError); |     conn.once('error', onError); | ||||||
|     conn.once('data', function (chunk) { |     conn.once('data', function (chunk) { | ||||||
|       //Adding this to track problems with error handling TODO: Remove this error handler.
 |       //Adding this to track problems with error handling TODO: Remove this error handler.
 | ||||||
|       conn.on('error', function(err) { |       conn.once('error', function(err) { | ||||||
|         console.log("Received error in tcpHandler after removing error listener.", |         console.log("Received error in tcpHandler after removing error listener.", | ||||||
|           "Number of errorListeners:", |           "Number of errorListeners:", conn.listenerCount("error"), | ||||||
|           conn.listenerCount() |           "Error: ", err | ||||||
|         ); |         ); | ||||||
|  |         if(!conn.listenerCount("error")) conn.emit("error", err); | ||||||
|       }); |       }); | ||||||
|       conn.removeListener('error', onError); |       conn.removeListener('error', onError); | ||||||
|       peek(conn, chunk, opts); |       peek(conn, chunk, opts); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user