diff options
author | Joey Hess <joey@kitenet.net> | 2013-05-22 15:47:06 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-05-22 15:47:06 -0400 |
commit | 40e1559718f80ab7b1b3ebb442a0663b7a0ae8f8 (patch) | |
tree | ab95ebfd613ba7e1a6813e8282387a5d7329000f /Assistant/NetMessager.hs | |
parent | f1ee72b8098e487b036cc1f35bb6aa08a8f8f948 (diff) |
fix minor memory leak caused by recent CanPush change
Putting the UUID in meant that equivilant CanPush messages no longer are ==
Diffstat (limited to 'Assistant/NetMessager.hs')
-rw-r--r-- | Assistant/NetMessager.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Assistant/NetMessager.hs b/Assistant/NetMessager.hs index 2e786717d..7c996bb09 100644 --- a/Assistant/NetMessager.hs +++ b/Assistant/NetMessager.hs @@ -32,8 +32,8 @@ notifyNetMessagerRestart = waitNetMessagerRestart :: Assistant () waitNetMessagerRestart = readSV <<~ (netMessagerRestart . netMessager) -{- Store an important NetMessage for a client, and if the same message was - - already sent, remove it from sentImportantNetMessages. -} +{- Store an important NetMessage for a client, and if an equivilant + - message was already sent, remove it from sentImportantNetMessages. -} storeImportantNetMessage :: NetMessage -> ClientID -> (ClientID -> Bool) -> Assistant () storeImportantNetMessage m client matchingclient = go <<~ netMessager where @@ -45,7 +45,7 @@ storeImportantNetMessage m client matchingclient = go <<~ netMessager putTMVar (sentImportantNetMessages nm) $ M.mapWithKey removematching sent removematching someclient s - | matchingclient someclient = S.delete m s + | matchingclient someclient = S.filter (not . equivilantImportantNetMessages m) s | otherwise = s {- Indicates that an important NetMessage has been sent to a client. -} |