wtclient: add DeactivateTower method

This commit adds the DeactiateTower method to the wtclient.ClientManager
interface along with its implementation. A test is also added for the
new method.
This commit is contained in:
Elle Mouton committed 2024-02-20 14:44:09 +02:00
1 parent 4548e72f79
commit beb9b2eeb8
4 files changed
+253 -17

No files matched your search

+2 -2
View File
@@ -765,7 +765,7 @@ func (s *sessionQueueSet) AddAndStart(sessionQueue *sessionQueue) {
// StopAndRemove stops the given session queue and removes it from the
// sessionQueueSet.
func (s *sessionQueueSet) StopAndRemove(id wtdb.SessionID) error {
func (s *sessionQueueSet) StopAndRemove(id wtdb.SessionID, final bool) error {
s.mu.Lock()
defer s.mu.Unlock()
@@ -776,7 +776,7 @@ func (s *sessionQueueSet) StopAndRemove(id wtdb.SessionID) error {
delete(s.queues, id)
return queue.Stop(true)
return queue.Stop(final)
}
// Get fetches and returns the sessionQueue with the given ID.