Revert "Revert "Remove unnessesary async and close on error in gateway""
This reverts commit cecd4adab086b9f481fdb13ee8286aff9a497ebe.
This commit is contained in:
		
							parent
							
								
									cecd4adab0
								
							
						
					
					
						commit
						e66dc796b7
					
				| @ -41,7 +41,7 @@ export async function Message(this: WebSocket, buffer: WS.Data) { | ||||
| 		return await OPCodeHandler.call(this, data); | ||||
| 	} catch (error) { | ||||
| 		console.error(error); | ||||
| 		if (!this.CLOSED && this.CLOSING) | ||||
| 		// if (!this.CLOSED && this.CLOSING)
 | ||||
| 			return this.close(CLOSECODES.Unknown_error); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| @ -6,7 +6,7 @@ try { | ||||
| } | ||||
| import { Payload, WebSocket } from "@fosscord/gateway"; | ||||
| 
 | ||||
| export async function Send(socket: WebSocket, data: Payload) { | ||||
| export function Send(socket: WebSocket, data: Payload) { | ||||
| 	let buffer: Buffer | string; | ||||
| 	if (socket.encoding === "etf") buffer = erlpack.pack(data); | ||||
| 	// TODO: encode circular object
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Madeline
						Madeline