Skip to content

Commit

Permalink
negate rtn value
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Aug 25, 2023
1 parent 7bb8985 commit b075456
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions uring/src/main/scala/fs2/io/uring/Uring.scala
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ private[uring] final class Uring[F[_]](ring: UringExecutorScheduler)(implicit F:
G.unit,
// if cannot cancel, fallback to get
get.flatMap { rtn =>
if (rtn < 0 && !mask(rtn)) G.raiseError(IOExceptionHelper(-rtn))
if (rtn < 0 && !mask(-rtn)) G.raiseError(IOExceptionHelper(-rtn))
else lift(release(rtn))
}
)
)
}
.flatTap(e => G.raiseWhen(e < 0 && !mask(e))(IOExceptionHelper(-e)))
.flatTap(e => G.raiseWhen(e < 0 && !mask(-e))(IOExceptionHelper(-e)))
}
}
}
Expand Down

0 comments on commit b075456

Please sign in to comment.