Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Commit

Permalink
bugfix: disconnect client when process crashed
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiChou committed Aug 7, 2018
1 parent f2d70cb commit 0e7cf46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class RpcHandler extends Handler {
script.destroyed.connect(() => {
socket.emit('script_destroyed')
socket.disconnect(true)
this.syslogClients.forEach(client => client.close())
})
script.message.connect((message, data) => {
const mapping = {
Expand Down Expand Up @@ -308,7 +309,6 @@ class RpcHandler extends Handler {
this.userScripts.delete(uuid)
return script.unload()
}
this.syslogClients.forEach(client => client.close())
throw new Error(`script not found: ${uuid}`)
}

Expand Down

0 comments on commit 0e7cf46

Please sign in to comment.