[common] revert started flag when service already stopped (#2326)

also, return ErrNotStarted when trying to stop a not-running service
This commit is contained in:
Anton Kaliaev
2018-09-13 03:07:29 +04:00
committed by Ethan Buchman
parent 1ea64fc27f
commit e3e3c13741
2 changed files with 15 additions and 3 deletions

View File

@ -174,9 +174,6 @@ func (c *WSClient) OnStart() error {
return nil
}
// OnStop implements cmn.Service.
func (c *WSClient) OnStop() {}
// Stop overrides cmn.Service#Stop. There is no other way to wait until Quit
// channel is closed.
func (c *WSClient) Stop() error {