audit: Fix duplicated request logs #1659
1 changed files with 1 additions and 1 deletions
|
@ -163,7 +163,7 @@ func (a *auditPutStream) Send(ctx context.Context, req *object.PutRequest) error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
a.failed = true
|
a.failed = true
|
||||||
}
|
}
|
||||||
if !errors.Is(err, util.ErrAbortStream) { // CloseAndRecv will not be called, so log here
|
if err != nil && !errors.Is(err, util.ErrAbortStream) { // CloseAndRecv will not be called, so log here
|
||||||
audit.LogRequestWithKey(ctx, a.log, objectGRPC.ObjectService_Put_FullMethodName, a.key,
|
audit.LogRequestWithKey(ctx, a.log, objectGRPC.ObjectService_Put_FullMethodName, a.key,
|
||||||
audit.TargetFromContainerIDObjectID(a.containerID, a.objectID),
|
audit.TargetFromContainerIDObjectID(a.containerID, a.objectID),
|
||||||
!a.failed)
|
!a.failed)
|
||||||
|
|
Loading…
Add table
Reference in a new issue