Skip to content

Commit

Permalink
log flushed pool retry
Browse files Browse the repository at this point in the history
  • Loading branch information
robx committed Aug 24, 2022
1 parent fcb3e5b commit e3726b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/PostgREST/AppState.hs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ usePool appState@AppState{..} session = do
Just p -> do
res <- SQL.use p session
case res of
Left SQL.PoolIsReleasedUsageError -> usePool appState session
Left SQL.PoolIsReleasedUsageError -> do
logWithZTime appState "Attempted to used flushed pool, retrying"
usePool appState session
_ -> return res

-- | Flush the connection pool so that any future use of the pool will
Expand Down

0 comments on commit e3726b0

Please sign in to comment.