From 9a070c02dcad62c446b3b475a91d97beee171b57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Wed, 18 Mar 2026 20:47:03 +0100 Subject: Retry with ephemeral port if default one is already in use Changelog: Avoid binding the same UDP port from multiple server instances on a single host. --- main/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/Main.hs') diff --git a/main/Main.hs b/main/Main.hs index f306158..8dee414 100644 --- a/main/Main.hs +++ b/main/Main.hs @@ -120,7 +120,7 @@ availableServices = options :: [ OptDescr (Options -> Writer [ String ] Options) ] options = [ Option [ 'p' ] [ "port" ] - (ReqArg (\p -> so $ \opts -> opts { serverPort = read p }) "") + (ReqArg (\p -> so $ \opts -> opts { serverPort = read p, serverRetryUnspecifiedPort = False }) "") "local port to bind" , Option [ 's' ] [ "silent" ] (NoArg (so $ \opts -> opts { serverLocalDiscovery = False })) -- cgit v1.2.3