@@ -58,8 +58,12 @@ import Network.Socket (fdSocket)
5858#endif
5959
6060-- | Creating 'Connection' for plain HTTP based on a given socket.
61−socketConnection :: Socket -> IO Connection
62−socketConnection s = do
61+socketConnection :: Settings -> Socket -> IO Connection
62+#if MIN_VERSION_network(3,1,1)
63+socketConnection set s = do
64+#else
65+socketConnection _ s = do
66+#endif
6367 bufferPool <- newBufferPool
6468 writeBuf <- allocateBuffer bufferSize
6569 let sendall = Sock.sendAll s
@@ -147,7 +151,7 @@ runSettingsSocket set socket app = do
147151 setSocketCloseOnExec s
148152 -- NoDelay causes an error for AF_UNIX.
149153 setSocketOption s NoDelay 1 `E.catch` \(E.SomeException _) -> return ()
150− conn <- socketConnection s
154+ conn <- socketConnection set s
151155 return (conn, sa)
152156
153157 closeListenSocket = close socket