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

+1-1
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)