changes to minimize allocations and provide useful info
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -405,6 +405,7 @@ func (s *rpcServer) Register() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
log.Logf("Subscribing %s to topic: %s", node.Id, sub.Topic())
|
||||
s.subscribers[sb] = []broker.Subscriber{sub}
|
||||
}
|
||||
|
||||
@@ -465,7 +466,7 @@ func (s *rpcServer) Deregister() error {
|
||||
|
||||
for sb, subs := range s.subscribers {
|
||||
for _, sub := range subs {
|
||||
log.Logf("Unsubscribing from topic: %s", sub.Topic())
|
||||
log.Logf("Unsubscribing %s from topic: %s", node.Id, sub.Topic())
|
||||
sub.Unsubscribe()
|
||||
}
|
||||
s.subscribers[sb] = nil
|
||||
|
||||
Reference in New Issue
Block a user