Change "close" connection event to "end"
This commit is contained in:
		
							parent
							
								
									9fd9464cc5
								
							
						
					
					
						commit
						32a470aec3
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -103,7 +103,7 @@ exports.connect = (server) => {
 | 
				
			||||||
    connection.on("error", (e) => {
 | 
					    connection.on("error", (e) => {
 | 
				
			||||||
      logger.error(e.toString());
 | 
					      logger.error(e.toString());
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
    connection.once("close", () => {
 | 
					    connection.once("end", () => {
 | 
				
			||||||
      for (const uuid of Object.keys(this.jobs)) {
 | 
					      for (const uuid of Object.keys(this.jobs)) {
 | 
				
			||||||
        if (this.jobs[uuid].addr === connection.remoteAddress) this.jobs[uuid].event.emit("error", "Job ended prematurely due to a closed connection; please run your image job again");
 | 
					        if (this.jobs[uuid].addr === connection.remoteAddress) this.jobs[uuid].event.emit("error", "Job ended prematurely due to a closed connection; please run your image job again");
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue