mirror of
https://github.com/zitadel/zitadel.git
synced 2025-04-16 08:31:29 +00:00
fix: handle closed channels on unsubscribe (#1995)
This commit is contained in:
parent
09b5c964cc
commit
f7aa2f6b25
@ -69,7 +69,10 @@ func (s *Subscription) Unsubscribe() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_, ok := <-s.Events
|
||||||
|
if ok {
|
||||||
close(s.Events)
|
close(s.Events)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func MapEventsToV1Events(events []EventReader) []*models.Event {
|
func MapEventsToV1Events(events []EventReader) []*models.Event {
|
||||||
|
@ -67,5 +67,8 @@ func (s *Subscription) Unsubscribe() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_, ok := <-s.Events
|
||||||
|
if ok {
|
||||||
close(s.Events)
|
close(s.Events)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user