@@ -61,7 +61,7 @@ import Simplex.Messaging.Server.QueueStore (RoundedSystemTime, ServerEntityStatu
6161import Simplex.Messaging.Server.Stats
6262import Simplex.Messaging.TMap (TMap )
6363import qualified Simplex.Messaging.TMap as TM
64- import Simplex.Messaging.Transport (ALPN , CertChainPubKey (.. ), SessionId , THandleAuth (.. ), THandleParams (.. ), TransportPeer (.. ), defaultSupportedParams )
64+ import Simplex.Messaging.Transport (CertChainPubKey (.. ), SessionId , THandleAuth (.. ), THandleParams (.. ), TransportPeer (.. ), defaultSupportedParams )
6565import Simplex.Messaging.Transport.Buffer (trimCR )
6666import Simplex.Messaging.Transport.HTTP2
6767import Simplex.Messaging.Transport.HTTP2.File (fileBlockSize )
@@ -92,17 +92,17 @@ data XFTPTransportRequest = XFTPTransportRequest
9292runXFTPServer :: XFTPServerConfig -> IO ()
9393runXFTPServer cfg = do
9494 started <- newEmptyTMVarIO
95- runXFTPServerBlocking started cfg $ Just supportedXFTPhandshakes
95+ runXFTPServerBlocking started cfg
9696
97- runXFTPServerBlocking :: TMVar Bool -> XFTPServerConfig -> Maybe [ ALPN ] -> IO ()
98- runXFTPServerBlocking started cfg alpn_ = newXFTPServerEnv cfg >>= runReaderT (xftpServer cfg started alpn_ )
97+ runXFTPServerBlocking :: TMVar Bool -> XFTPServerConfig -> IO ()
98+ runXFTPServerBlocking started cfg = newXFTPServerEnv cfg >>= runReaderT (xftpServer cfg started)
9999
100100data Handshake
101101 = HandshakeSent C. PrivateKeyX25519
102102 | HandshakeAccepted (THandleParams XFTPVersion 'TServer)
103103
104- xftpServer :: XFTPServerConfig -> TMVar Bool -> Maybe [ ALPN ] -> M ()
105- xftpServer cfg@ XFTPServerConfig {xftpPort, transportConfig, inactiveClientExpiration, fileExpiration, xftpServerVRange} started alpn_ = do
104+ xftpServer :: XFTPServerConfig -> TMVar Bool -> M ()
105+ xftpServer cfg@ XFTPServerConfig {xftpPort, transportConfig, inactiveClientExpiration, fileExpiration, xftpServerVRange} started = do
106106 mapM_ (expireServerFiles Nothing ) fileExpiration
107107 restoreServerStats
108108 raceAny_ (runServer : expireFilesThread_ cfg <> serverStatsThread_ cfg <> controlPortThread_ cfg) `finally` stopServer
@@ -116,7 +116,7 @@ xftpServer cfg@XFTPServerConfig {xftpPort, transportConfig, inactiveClientExpira
116116 env <- ask
117117 sessions <- liftIO TM. emptyIO
118118 let cleanup sessionId = atomically $ TM. delete sessionId sessions
119- liftIO . runHTTP2Server started xftpPort defaultHTTP2BufferSize defaultSupportedParams srvCreds alpn_ transportConfig inactiveClientExpiration cleanup $ \ sessionId sessionALPN r sendResponse -> do
119+ liftIO . runHTTP2Server started xftpPort defaultHTTP2BufferSize defaultSupportedParams srvCreds transportConfig inactiveClientExpiration cleanup $ \ sessionId sessionALPN r sendResponse -> do
120120 reqBody <- getHTTP2Body r xftpBlockSize
121121 let v = VersionXFTP 1
122122 thServerVRange = versionToRange v
0 commit comments