8000 Changed send to sendall · postgres-haskell/postgres-wire@be419d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit be419d7

Browse files
Changed send to sendall
1 parent 72f90fb commit be419d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Database/PostgreSQL/Driver/RawConnection.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import System.Socket (socket, AddressInfo(..), getAddressInfo, socketAddress,
99
aiV4Mapped, AddressInfoException, Socket, connect,
1010
close, receive, send)
1111
import System.Socket.Family.Inet (Inet)
12-
import System.Socket.Type.Stream (Stream)
12+
import System.Socket.Type.Stream (Stream, sendAll)
1313
import System.Socket.Protocol.TCP (TCP)
1414
import System.Socket.Family.Unix (Unix, socketAddressUnixPath)
1515
import qualified Data.ByteString as B
@@ -66,11 +66,11 @@ createRawConnection settings
6666
let dir = B.reverse . B.dropWhile (== 47) $ B.reverse dirPath
6767
in dir <> "/" <> unixPathFilename <> portStr
6868

69-
constructRawConnection :: Socket f t p -> RawConnection
69+
constructRawConnection :: Socket f Stream p -> RawConnection
7070
constructRawConnection s = RawConnection
7171
{ rFlush = pure ()
7272
, rClose = close s
73-
, rSend = \msg -> void $ send s msg mempty
73+
, rSend = \msg -> void $ sendAll s msg mempty
7474
, rReceive = \n -> receive s n mempty
7575
}
7676

0 commit comments

Comments
 (0)
0