add a bool in payload struct
This commit is contained in:
12
call.go
12
call.go
@ -164,7 +164,11 @@ func Invoke(ctx context.Context, method string, args, reply interface{}, cc *Cli
|
||||
return toRPCErr(err)
|
||||
}
|
||||
if EnableTracing {
|
||||
c.traceInfo.tr.LazyLog(&fmtStringer{"sent: %v", []interface{}{payload{args}}}, true)
|
||||
p := &payload{
|
||||
sent: true,
|
||||
msg: args,
|
||||
}
|
||||
c.traceInfo.tr.LazyLog(p, true)
|
||||
}
|
||||
stream, err = sendRequest(ctx, cc.dopts.codec, callHdr, t, args, topts)
|
||||
if err != nil {
|
||||
@ -183,7 +187,11 @@ func Invoke(ctx context.Context, method string, args, reply interface{}, cc *Cli
|
||||
continue
|
||||
}
|
||||
if EnableTracing {
|
||||
c.traceInfo.tr.LazyLog(&fmtStringer{"received: %v", []interface{}{payload{reply}}}, true)
|
||||
p := &payload{
|
||||
sent: false,
|
||||
msg: reply,
|
||||
}
|
||||
c.traceInfo.tr.LazyLog(p, true)
|
||||
}
|
||||
t.CloseStream(stream, lastErr)
|
||||
if lastErr != nil {
|
||||
|
||||
Reference in New Issue
Block a user