@@ -44,8 +44,8 @@ offlineGossipMinTtl = 60 -- minimum TTL for offline gossip events
4444maxForwardRetriesPerServer = 100
4545maxGossipHops = 5
4646gossipOriginHops = 2
47−maxPollTimeout : Int<Ms>
48−maxPollTimeout = 60000 -- 1 minute
47+pollTimeout : Int<Ms>
48+pollTimeout = 20000 -- 20 seconds
4949backgroundPruneInterval : Int<Ms>
5050backgroundPruneInterval = 30000 -- 30 seconds
5151federationEnabled = federationSecret != ""
@@ -153,7 +153,7 @@ route AuthApi where
153153 = VerifyAuth
154154
155155route ClientApi where
156− POST {cursor: Timestamp, timeout: Int<Ms>} /poll headers {authorization: Text}
156+ POST {cursor: Timestamp} /poll headers {authorization: Text}
157157 -> {events: [PollEvent], cursor: Timestamp, authorized: Bool}
158158 = Poll
159159 /messages
@@ -916,10 +916,9 @@ serve = \req -> case req of
916916 broadcastOfflineGossip t result.pr.peerServers expiredLocal)
917917 yield (respond {token: token, expiresAt: expiry})
918918
919− Poll {cursor, timeout, authorization, respond} -> do
919+ Poll {cursor, authorization, respond} -> do
920920 t <- now
921− let clampedTimeout = clamp 0 maxPollTimeout timeout
922− let deadline = t + clampedTimeout
921+ let deadline = t + pollTimeout
923922 result <- case extractToken authorization of
924923 Nothing {} -> yield (PollUnauthorized {})
925924 Just {value: token} -> pollLoop token cursor deadline