summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-06-11 16:06:48 +0300
committerValery Piashchynski <[email protected]>2021-06-11 16:06:48 +0300
commite4ff7a9b6537985e8272b88c08698991f25a4013 (patch)
treeb331e90d3508fd8534ea91adb56bed4f0f070437
parent4c6a04f16399ab353d81d1820877b764ad2d20c5 (diff)
Remove redundant frame to byte casting
Signed-off-by: Valery Piashchynski <[email protected]>
-rwxr-xr-xinternal/protocol.go2
-rwxr-xr-xpkg/worker/sync_worker.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/protocol.go b/internal/protocol.go
index 3257c1d9..a344a3c4 100755
--- a/internal/protocol.go
+++ b/internal/protocol.go
@@ -81,7 +81,7 @@ func FetchPID(rl relay.Relay) (int64, error) {
flags := frameR.ReadFlags()
- if flags&(byte(frame.CONTROL)) == 0 {
+ if flags&frame.CONTROL == 0 {
return 0, errors.E(op, errors.Str("unexpected response, header is missing, no CONTROL flag"))
}
diff --git a/pkg/worker/sync_worker.go b/pkg/worker/sync_worker.go
index 3d049ba7..c41b5b52 100755
--- a/pkg/worker/sync_worker.go
+++ b/pkg/worker/sync_worker.go
@@ -171,7 +171,7 @@ func (tw *SyncWorkerImpl) execPayload(p payload.Payload) (payload.Payload, error
flags := frameR.ReadFlags()
- if flags&byte(frame.ERROR) != byte(0) {
+ if flags&frame.ERROR != byte(0) {
return payload.Payload{}, errors.E(op, errors.SoftJob, errors.Str(string(frameR.Payload())))
}