internally mark if a server is restoring to restrict actions
This commit is contained in:
@@ -70,6 +70,10 @@ func (s *Server) HandlePowerAction(action PowerAction, waitSeconds ...int) error
|
||||
return ErrServerIsTransferring
|
||||
}
|
||||
|
||||
if s.IsRestoring() {
|
||||
return ErrServerIsRestoring
|
||||
}
|
||||
|
||||
if s.powerLock == nil {
|
||||
s.powerLock = semaphore.NewWeighted(1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user