Skip to content

Commit

Permalink
deffered frame to one level
Browse files Browse the repository at this point in the history
  • Loading branch information
azimov committed Jul 31, 2024
1 parent 1fb0f18 commit 5cc0090
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/PooledConnectionHandler.R
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ PooledConnectionHandler <- R6::R6Class(
#' Returns a connection from the pool
#' When the desired frame exits, the connection will be returned to the pool
#' @param .deferedFrame defaults to the parent frame of the calling block.
getConnection = function(.deferedFrame = parent.frame(n = 2)) {
getConnection = function(.deferedFrame = parent.frame(n = 1)) {
conn <- pool::poolCheckout(super$getConnection())
withr::defer(pool::poolReturn(conn), envir = .deferedFrame)
return(conn)
Expand Down

0 comments on commit 5cc0090

Please sign in to comment.