From 2b7d5d54011ffcc93511bf05f44163a4b7a1270c Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 16 Jun 2019 14:29:03 +0300 Subject: Fix reply rendering infinite loop bug --- matrix/rooms/room.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'matrix/rooms') diff --git a/matrix/rooms/room.go b/matrix/rooms/room.go index a0918b1..be91065 100644 --- a/matrix/rooms/room.go +++ b/matrix/rooms/room.go @@ -148,6 +148,9 @@ func (room *Room) Load() { room.lock.Lock() room.load() room.lock.Unlock() + if room.postLoad != nil { + room.postLoad() + } } func (room *Room) load() { @@ -177,9 +180,6 @@ func (room *Room) load() { debug.Print("Failed to decode room state:", err) } room.changed = false - if room.postLoad != nil { - room.postLoad() - } } func (room *Room) Touch() { -- cgit v1.2.3