Skip to content

Commit 798a967

Browse files
committed
Allow handling server connection errors
1 parent 246b7ba commit 798a967

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ exports.Server = class TCPServer extends EventEmitter {
624624
} catch (err) {
625625
socket.destroy()
626626

627-
throw err
627+
this.emit('error', err)
628628
}
629629
}
630630

0 commit comments

Comments
 (0)