diff --git a/package.yaml b/package.yaml index 42e3ce48d..700fc1e2a 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: simplexmq -version: 0.3.0 +version: 0.3.1 synopsis: SimpleXMQ message broker description: | This package includes <./docs/Simplex-Messaging-Server.html server>, diff --git a/src/Simplex/Messaging/Agent.hs b/src/Simplex/Messaging/Agent.hs index 29d8ef8f2..56ae7e53a 100644 --- a/src/Simplex/Messaging/Agent.hs +++ b/src/Simplex/Messaging/Agent.hs @@ -74,7 +74,7 @@ runSMPAgentBlocking started cfg@AgentConfig {tcpPort} = runReaderT smpAgent =<< where smpAgent :: (MonadUnliftIO m', MonadReader Env m') => m' () smpAgent = runTCPServer started tcpPort $ \h -> do - liftIO $ putLn h "Welcome to SMP v0.3.0 agent" + liftIO $ putLn h "Welcome to SMP v0.3.1 agent" c <- getSMPAgentClient logConnection c True race_ (connectClient h c) (runSMPAgentClient c) diff --git a/src/Simplex/Messaging/Transport.hs b/src/Simplex/Messaging/Transport.hs index 82eabcaf9..d4accdb64 100644 --- a/src/Simplex/Messaging/Transport.hs +++ b/src/Simplex/Messaging/Transport.hs @@ -170,7 +170,7 @@ major :: SMPVersion -> (Int, Int) major (SMPVersion a b _ _) = (a, b) currentSMPVersion :: SMPVersion -currentSMPVersion = SMPVersion 0 3 0 0 +currentSMPVersion = SMPVersion 0 3 1 0 serializeSMPVersion :: SMPVersion -> ByteString serializeSMPVersion (SMPVersion a b c d) = B.intercalate "." [bshow a, bshow b, bshow c, bshow d] diff --git a/tests/SMPAgentClient.hs b/tests/SMPAgentClient.hs index f62b71967..48d179382 100644 --- a/tests/SMPAgentClient.hs +++ b/tests/SMPAgentClient.hs @@ -8,6 +8,7 @@ module SMPAgentClient where import Control.Monad.IO.Unlift import Crypto.Random +import qualified Data.ByteString.Char8 as B import qualified Data.List.NonEmpty as L import Network.Socket (HostName, ServiceName) import SMPClient @@ -166,9 +167,9 @@ testSMPAgentClientOn :: MonadUnliftIO m => ServiceName -> (Handle -> m a) -> m a testSMPAgentClientOn port' client = do runTCPClient agentTestHost port' $ \h -> do line <- liftIO $ getLn h - if line == "Welcome to SMP v0.3.0 agent" + if line == "Welcome to SMP v0.3.1 agent" then client h - else error "not connected" + else error $ "wrong welcome message: " <> B.unpack line testSMPAgentClient :: MonadUnliftIO m => (Handle -> m a) -> m a testSMPAgentClient = testSMPAgentClientOn agentTestPort