mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-19 18:13:41 -05:00
Prevent blocking when trying to stop matrix container
This commit is contained in:
parent
5b3e91524e
commit
e670fd05c2
1 changed files with 4 additions and 1 deletions
|
@ -278,7 +278,10 @@ func (c *Container) Logout() {
|
||||||
func (c *Container) Stop() {
|
func (c *Container) Stop() {
|
||||||
if c.running {
|
if c.running {
|
||||||
debug.Print("Stopping Matrix container...")
|
debug.Print("Stopping Matrix container...")
|
||||||
c.stop <- true
|
select {
|
||||||
|
case c.stop <- true:
|
||||||
|
default:
|
||||||
|
}
|
||||||
c.client.StopSync()
|
c.client.StopSync()
|
||||||
debug.Print("Closing history manager...")
|
debug.Print("Closing history manager...")
|
||||||
err := c.history.Close()
|
err := c.history.Close()
|
||||||
|
|
Loading…
Add table
Reference in a new issue