fix: major fixes
This commit is contained in:
1 parent
9d7a6a46c9
commit
4b94fcb920
6 files changed
+90
-35
No files matched your search
+1
-2
@@ -128,6 +128,7 @@ func (w *Webhook) Start(_ context.Context) (<-chan model.Update, error) {
|
||||
}
|
||||
|
||||
func (w *Webhook) Stop(ctx context.Context) error {
|
||||
close(w.ch)
|
||||
return w.srv.Shutdown(ctx)
|
||||
}
|
||||
|
||||
@@ -176,8 +177,6 @@ func (lp *LongPoller) Start(ctx context.Context) (<-chan model.Update, error) {
|
||||
|
||||
for _, update := range updates {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
case ch <- update:
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user