~f4814n/frost

486f96bbc1c5e2d9dcbeb575f2d750969a4649ef — Fabian Geiselhart 3 months ago 32a1fe2
fix: roomlist.Run used 100% CPU
1 files changed, 2 insertions(+), 7 deletions(-)

M view/roomlist/roomlist.go
M view/roomlist/roomlist.go => view/roomlist/roomlist.go +2 -7
@@ 55,13 55,8 @@ func (l *view) Run(rx, tx chan frost.Event) {
	matrixEvents := make(chan matrix.Event, 100)
	l.cli.Notify(matrixEvents)

	for {
		select {
		case event := <-matrixEvents:
			l.handleMatrixEvent(event)
		default:
			continue
		}
	for event := range matrixEvents {
		l.handleMatrixEvent(event)
	}
}