Skip to content

Commit

Permalink
Show error message on socket error
Browse files Browse the repository at this point in the history
`err.name` would just return `Error` whereas `err.message`  would return `bind EACCES 0.0.0.0:57431`
  • Loading branch information
longzheng authored and Sunoo committed Aug 24, 2021
1 parent 20521da commit b330486
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/streamingDelegate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ export class StreamingDelegate implements CameraStreamingDelegate {

activeSession.socket = createSocket(sessionInfo.ipv6 ? 'udp6' : 'udp4');
activeSession.socket.on('error', (err: Error) => {
this.log.error('Socket error: ' + err.name, this.cameraName);
this.log.error('Socket error: ' + err.message, this.cameraName);
this.stopStream(request.sessionID);
});
activeSession.socket.on('message', () => {
Expand Down

0 comments on commit b330486

Please sign in to comment.