move trace log to condition
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
ef49b96583
commit
51f77581bc
@ -207,10 +207,10 @@ func (k *kBroker) Publish(ctx context.Context, topic string, msg *broker.Message
|
|||||||
wCtx = ctx
|
wCtx = ctx
|
||||||
}
|
}
|
||||||
err = writer.WriteMessages(wCtx, kmsg)
|
err = writer.WriteMessages(wCtx, kmsg)
|
||||||
|
if err != nil {
|
||||||
if k.opts.Logger.V(logger.TraceLevel) {
|
if k.opts.Logger.V(logger.TraceLevel) {
|
||||||
k.opts.Logger.Tracef(k.opts.Context, "write message err: %v", err)
|
k.opts.Logger.Tracef(k.opts.Context, "write message err: %v", err)
|
||||||
}
|
}
|
||||||
if err != nil {
|
|
||||||
switch cached {
|
switch cached {
|
||||||
case false:
|
case false:
|
||||||
// non cached case, we can try to wait on some errors, but not timeout
|
// non cached case, we can try to wait on some errors, but not timeout
|
||||||
|
Loading…
Reference in New Issue
Block a user