Skip to content

Commit defecb8

Browse files
Fixed rawReceive
1 parent 2072ede commit defecb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Database/PostgreSQL/Driver/RawConnection.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ rawReceive s bs n = B.unsafeUseAsCStringLen bs $ \(prevPtr, prevLen) ->
9292
in B.createUptoN bufSize $ \bufPtr -> do
9393
B.memcpy bufPtr (castPtr prevPtr) prevLen
9494
len <- unsafeReceive s (bufPtr `plusPtr` prevLen)
95-
(fromIntegral bufSize) mempty
95+
(fromIntegral n) mempty
9696
-- Received empty string means closed connection by the remote host
9797
when (len == 0) throwClosedException
9898
pure $ prevLen + fromIntegral len

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy