packages feed

pqi-native 0.2.0.3 → 0.2.0.5

raw patch · 3 files changed

+26/−2 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,15 @@+# v0.2.0.5++## Fixes++- Fixed the release process to actually result in publishing of the package.++# v0.2.0.4++## Fixes++- Fixed the connection closing.+ # v0.2.0.3  Documentation corrections.
pqi-native.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: pqi-native-version: 0.2.0.3+version: 0.2.0.5 category: Database, PostgreSQL synopsis: Native (pure-Haskell) adapter for pqi description:
src/library/Pqi/Native.hs view
@@ -49,7 +49,19 @@   Pqi.Connection     { Pqi.connectPoll = pure Pqi.PollingOk,       Pqi.isNullConnection = (Connection.isNull connection),-      Pqi.finish = readIORef (Connection.transport connection) >>= Transport.close,+      Pqi.finish = do+        transport <- readIORef (Connection.transport connection)+        Transport.close transport+        -- Mark the connection unusable so that any further protocol+        -- operation is rejected by the 'ConnectionOk' guards (e.g.+        -- 'Pqi.Native.Query.sendAsync', 'withReady') instead of attempting+        -- I/O on the now-closed socket. Without this, a caller that keeps+        -- using a 'Pqi.Connection' after 'finish' (a supported pattern via+        -- 'Hasql.Session.onLibpqConnection', used e.g. by hasql-pool to test+        -- eviction of a broken connection) can have a later send attempt+        -- block forever instead of failing, if the closed file descriptor+        -- has since been reused elsewhere in the process.+        writeIORef (Connection.connStatus connection) Pqi.ConnectionBad,       Pqi.reset = Connection.reconnect connection,       Pqi.resetStart = Connection.reconnect connection $> True,       Pqi.resetPoll = pure Pqi.PollingOk,