Rename internal ProcessState to ServerState

This commit is contained in:
Ken Hibino
2020-04-12 16:42:11 -07:00
parent 4f11e52558
commit aafd8a5b74
11 changed files with 180 additions and 168 deletions

View File

@@ -276,7 +276,8 @@ func (srv *Server) Start(handler Handler) error {
// Stops the background-task processing.
// TODO: do we need to return error?
func (srv *Server) Stop() {
if srv.ss.Status() != base.StatusRunning {
switch srv.ss.Status() {
case base.StatusIdle, base.StatusStopped:
// server is not running, do nothing and return.
return
}