Skip to content

Commit 1f40cfc

Browse files
kegsaybnjbvr
authored andcommitted
Invoke the rooms listener async as per comment
1 parent 5173d10 commit 1f40cfc

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

internal/api/rust/rust.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,12 @@ func (c *RustClient) ensureListening(t ct.TestLike, roomID string) {
697697
return false
698698
}
699699
if room := c.findRoom(t, roomID); room != nil {
700-
c.ensureListening(t, roomID) // this should work now
700+
// Do this asynchronously because adding a timeline listener is done synchronously
701+
// which will cause "signal arrived during cgo execution" if it happens within
702+
// this rooms listener callback.
703+
go func() {
704+
c.ensureListening(t, roomID) // this should work now
705+
}()
701706
return true
702707
}
703708
return false

0 commit comments

Comments
 (0)