Skip to content

Commit

Permalink
add conditional checks
Browse files Browse the repository at this point in the history
  • Loading branch information
TusharMohapatra07 committed Dec 15, 2024
1 parent ed66472 commit 079a6da
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions internal/app/subsystems/aio/sender/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,15 @@ func (w *SenderWorker) Process(sqe *bus.SQE[t_aio.Submission, t_aio.Completion])
util.Assert((logicalRecv != nil) != (physicalRecv != nil), "one of logical or physical recv must be nil, but not both")

var recv *receiver.Recv
// if logicalRecv != nil {
// recv = w.targets[*logicalRecv]
// } else {
// recv = physicalRecv
// }
recv, _ = SchemeToRecv(*logicalRecv)

Check warning on line 224 in internal/app/subsystems/aio/sender/sender.go

View check run for this annotation

Codecov / codecov/patch

internal/app/subsystems/aio/sender/sender.go#L224

Added line #L224 was not covered by tests
if logicalRecv != nil {
recv = w.targets[*logicalRecv]
if recv == nil {
recv, _ = SchemeToRecv(*logicalRecv)
}

Check warning on line 229 in internal/app/subsystems/aio/sender/sender.go

View check run for this annotation

Codecov / codecov/patch

internal/app/subsystems/aio/sender/sender.go#L227-L229

Added lines #L227 - L229 were not covered by tests
} else {
recv = physicalRecv
}

if recv == nil {
cqe.Error = fmt.Errorf("unknown receiver %s", *logicalRecv)
Expand Down

0 comments on commit 079a6da

Please sign in to comment.