Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix: succeed when stopping already stopped
Browse files Browse the repository at this point in the history
  • Loading branch information
pgte committed Jun 30, 2017
1 parent fcef848 commit 74f3185
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/components/stop.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ module.exports = (self) => {
callback = callback || function noop () {}
self.log('stop')

if (self.state.state() === 'stopped') {
callback()
return
}

const done = (err) => {
if (err) {
self.emit('error', err)
Expand Down

0 comments on commit 74f3185

Please sign in to comment.