per-client inboxes for push messages
This will avoid losing any messages received from 1 client when a push involving another client is running. Additionally, the handling of push initiation is improved, it's no longer allowed to run multiples of the same type of push to the same client. Still stalls sometimes :(
This commit is contained in:
parent
df3203ec62
commit
9efde46cdd
4 changed files with 108 additions and 76 deletions
|
@ -108,11 +108,10 @@ xmppClient urlrenderer d creds =
|
|||
maybe noop (inAssistant . pairMsgReceived urlrenderer stage u selfjid) (parseJID c)
|
||||
handle _ (GotNetMessage m@(Pushing _ pushstage))
|
||||
| isPushNotice pushstage = inAssistant $ handlePushNotice m
|
||||
| isPushInitiation pushstage = inAssistant $
|
||||
unlessM (queueNetPushMessage m) $ do
|
||||
let checker = checkCloudRepos urlrenderer
|
||||
void $ forkIO <~> handlePushInitiation checker m
|
||||
| otherwise = void $ inAssistant $ queueNetPushMessage m
|
||||
| isPushInitiation pushstage = inAssistant $ do
|
||||
let checker = checkCloudRepos urlrenderer
|
||||
void $ forkIO <~> handlePushInitiation checker m
|
||||
| otherwise = void $ inAssistant $ storeInbox m
|
||||
handle _ (Ignorable _) = noop
|
||||
handle _ (Unknown _) = noop
|
||||
handle _ (ProtocolError _) = noop
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue