diff options
Diffstat (limited to 'src/containerManager.go')
-rw-r--r-- | src/containerManager.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/containerManager.go b/src/containerManager.go index 0c25ae9..c8af5f9 100644 --- a/src/containerManager.go +++ b/src/containerManager.go @@ -62,6 +62,16 @@ func stopChallengeContainer(name string) { } } +// Stops all containers. Thread-safe! +func stopAllChallengeContainers() { + containerStopLock.Lock() + defer containerStopLock.Unlock() + + for _, c := range containers { + c.stopContainer() + } +} + // Returns the address for the given container, if there is a container with this name running func getAddressForChallengeContainer(container string) (address string) { for _, c := range containers { |