store missing port as empty string instead of NULL (#280)

This commit is contained in:
Evgeny Poberezkin authored and GitHub committed 2022-01-11 16:01:09 +00:00
1 parent b5cb5618c1
commit 083d39be22
11 files changed
+48 -35

No files matched your search

+3 -3
View File
@@ -164,9 +164,9 @@ getSMPClient smpServer cfg@SMPClientConfig {qSize, tcpTimeout, smpPing} msgQ dis
useTransport :: (ServiceName, ATransport)
useTransport = case port smpServer of
Nothing -> defaultTransport cfg
Just "80" -> ("80", transport @WS)
Just p -> (p, transport @TLS)
"" -> defaultTransport cfg
"80" -> ("80", transport @WS)
p -> (p, transport @TLS)
client :: forall c. Transport c => TProxy c -> SMPClient -> TMVar (Either SMPClientError (THandle c)) -> c -> IO ()
client _ c thVar h =