We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2072ede commit defecb8Copy full SHA for defecb8
src/Database/PostgreSQL/Driver/RawConnection.hs
@@ -92,7 +92,7 @@ rawReceive s bs n = B.unsafeUseAsCStringLen bs $ \(prevPtr, prevLen) ->
92
in B.createUptoN bufSize $ \bufPtr -> do
93
B.memcpy bufPtr (castPtr prevPtr) prevLen
94
len <- unsafeReceive s (bufPtr `plusPtr` prevLen)
95
- (fromIntegral bufSize) mempty
+ (fromIntegral n) mempty
96
-- Received empty string means closed connection by the remote host
97
when (len == 0) throwClosedException
98
pure $ prevLen + fromIntegral len
0 commit comments