ntf server: do not resubscribe to error/ended subscriptions on restart (#464)

This commit is contained in:
Evgeny Poberezkin
2022-07-06 18:20:49 +01:00
committed by GitHub
parent cc798145d2
commit 991548b64d
3 changed files with 15 additions and 4 deletions
@@ -412,6 +412,16 @@ data NtfSubStatus
NSErr ByteString
deriving (Eq, Show)
ntfShouldSubscribe :: NtfSubStatus -> Bool
ntfShouldSubscribe = \case
NSNew -> True
NSPending -> True
NSActive -> True
NSInactive -> True
NSEnd -> False
NSAuth -> False
NSErr _ -> False
instance Encoding NtfSubStatus where
smpEncode = \case
NSNew -> "NEW"