Prevent blocking when trying to stop matrix container

This commit is contained in:
Tulir Asokan 2020-05-06 20:11:35 +03:00
parent 5b3e91524e
commit e670fd05c2

View File

@ -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()