fix sub ctx
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
74b29ac236
commit
e20ed5dc32
7
http.go
7
http.go
@ -230,10 +230,11 @@ func (h *httpServer) Deregister() error {
|
||||
|
||||
subCtx := h.opts.Context
|
||||
for sb, subs := range h.subscribers {
|
||||
if cx := sb.Options().Context; cx != nil {
|
||||
subCtx = cx
|
||||
}
|
||||
|
||||
for _, sub := range subs {
|
||||
if cx := sb.Options().Context; cx != nil {
|
||||
subCtx = cx
|
||||
}
|
||||
logger.Infof("Unsubscribing from topic: %s", sub.Topic())
|
||||
if err := sub.Unsubscribe(subCtx); err != nil {
|
||||
logger.Errorf("failed to unsubscribe topic: %s, error: %v", sb.Topic(), err)
|
||||
|
Loading…
Reference in New Issue
Block a user