diff --git a/matrix/matrix.go b/matrix/matrix.go index 30e28fb..072816d 100644 --- a/matrix/matrix.go +++ b/matrix/matrix.go @@ -278,7 +278,10 @@ func (c *Container) Logout() { func (c *Container) Stop() { if c.running { debug.Print("Stopping Matrix container...") - c.stop <- true + select { + case c.stop <- true: + default: + } c.client.StopSync() debug.Print("Closing history manager...") err := c.history.Close()