Skip to content

Commit

Permalink
feat: added socket error event listener
Browse files Browse the repository at this point in the history
  • Loading branch information
Mounayer committed Oct 15, 2024
1 parent a8fa81e commit e927920
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions client/src/routes/App/FileTransfer/FileTransfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,14 @@ class FileTransfer extends PureComponent {
});
});

socket.on('error', err => {
this.setState({
errorModal: {
isOpen: true,
type: err.reason || constants.ERR_CONN_CLOSED,
},
});
});

this.clearReceiver = this.fileShare.receiveFiles({
onMeta: (data) => {
Expand Down

0 comments on commit e927920

Please sign in to comment.