Skip to content

Commit

Permalink
Log more
Browse files Browse the repository at this point in the history
  • Loading branch information
svroonland committed Apr 20, 2024
1 parent b1c526e commit 6a1a694
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions zio-kafka/src/main/scala/zio/kafka/consumer/Consumer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -726,11 +726,15 @@ private[consumer] final class ConsumerLive private[consumer] (
fib <- withStream(control.stream)
.onInterrupt(ZIO.logError("withStream in runWithGracefulShutdown interrupted, this should not happen"))
.forkDaemon
result <- fib.join.onInterrupt(
control.stop *> fib.join.disconnect
.timeout(shutdownTimeout)
.ignore
)
result <-
fib.join.onInterrupt(
control.stop *> fib.join
.timeout(shutdownTimeout)
.tapErrorCause(cause =>
ZIO.logErrorCause("Error joining withStream fiber in runWithGracefulShutdown", cause)
)
.ignore
)
} yield result
}

Expand Down

0 comments on commit 6a1a694

Please sign in to comment.