Skip to content

Commit

Permalink
feat: Set state to disconnected when a connection error occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
Billiam committed Aug 25, 2022
1 parent 1943880 commit 1bf77e7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/state-feeder.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ export default (socket, ackBus) => {
'workflow:state': (status) => {
cnc.setWorkflowState(status)
},
connect_error: () => {
if (cnc.connected) {
cnc.setConnected(false)
}
},
}
const workerListeners = {
message: (e) => {
Expand Down

0 comments on commit 1bf77e7

Please sign in to comment.