fixup redis broker
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
002a038413
commit
46fbd9846a
5
redis.go
5
redis.go
@ -230,14 +230,13 @@ func (b *Broker) Subscribe(ctx context.Context, topic string, handler broker.Han
|
|||||||
done: make(chan struct{}),
|
done: make(chan struct{}),
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run the receiver routine.
|
|
||||||
go s.loop()
|
|
||||||
|
|
||||||
s.sub = b.cli.Subscribe(s.ctx, s.topic)
|
s.sub = b.cli.Subscribe(s.ctx, s.topic)
|
||||||
if err := s.sub.Ping(ctx, ""); err != nil {
|
if err := s.sub.Ping(ctx, ""); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
go s.loop()
|
||||||
|
|
||||||
return s, nil
|
return s, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user