Log error responses when deleting proxy publishers / subscribers.
This commit is contained in:
parent
1774d56d7d
commit
42a8aab307
10
mcu_proxy.go
10
mcu_proxy.go
|
@ -170,9 +170,12 @@ func (p *mcuProxyPublisher) Close(ctx context.Context) {
|
|||
},
|
||||
}
|
||||
|
||||
if _, err := p.conn.performSyncRequest(ctx, msg); err != nil {
|
||||
if response, err := p.conn.performSyncRequest(ctx, msg); err != nil {
|
||||
log.Printf("Could not delete publisher %s at %s: %s", p.proxyId, p.conn, err)
|
||||
return
|
||||
} else if response.Type == "error" {
|
||||
log.Printf("Could not delete publisher %s at %s: %s", p.proxyId, p.conn, response.Error)
|
||||
return
|
||||
}
|
||||
|
||||
log.Printf("Delete publisher %s at %s", p.proxyId, p.conn)
|
||||
|
@ -247,9 +250,12 @@ func (s *mcuProxySubscriber) Close(ctx context.Context) {
|
|||
},
|
||||
}
|
||||
|
||||
if _, err := s.conn.performSyncRequest(ctx, msg); err != nil {
|
||||
if response, err := s.conn.performSyncRequest(ctx, msg); err != nil {
|
||||
log.Printf("Could not delete subscriber %s at %s: %s", s.proxyId, s.conn, err)
|
||||
return
|
||||
} else if response.Type == "error" {
|
||||
log.Printf("Could not delete subscriber %s at %s: %s", s.proxyId, s.conn, response.Error)
|
||||
return
|
||||
}
|
||||
|
||||
log.Printf("Delete subscriber %s at %s", s.proxyId, s.conn)
|
||||
|
|
Loading…
Reference in New Issue