Homec4science

Implement unsubscription in the Aphlict client.

Authored by Joshua Spence <josh@joshuaspence.com> on Jun 12 2014, 01:36.

Description

Implement unsubscription in the Aphlict client.

Summary: Ref T5284. When an AphlictClient is closed, it will eventually be purged from the pool by the AphlictMaster. When this happens, also unsubscribe the purged client from all notifications, and send an unsubscribe command to the Aphlict server if possible.

Test Plan:
Verified the output of the Aphlict server (running in debug mode):

[Wed Jun 11 2014 23:21:31 GMT+0000 (UTC)] <FlashPolicy> Policy Request From ::ffff:192.168.1.1
[Wed Jun 11 2014 23:21:31 GMT+0000 (UTC)] <Listener/2> Connected from ::ffff:192.168.1.1
[Wed Jun 11 2014 23:21:31 GMT+0000 (UTC)] <Listener/2> Received data: {"command":"subscribe","data":["PHID-USER-cb5af6p4oepy5tlgqypi"]}
[Wed Jun 11 2014 23:21:31 GMT+0000 (UTC)] <Listener/2> Subscribed to: ["PHID-USER-cb5af6p4oepy5tlgqypi"]
[Wed Jun 11 2014 23:21:39 GMT+0000 (UTC)] <Listener/2> Received data: {"command":"subscribe","data":["PHID-TASK-l2dtbs5xrt2b7abgh5a6"]}
[Wed Jun 11 2014 23:21:39 GMT+0000 (UTC)] <Listener/2> Subscribed to: ["PHID-TASK-l2dtbs5xrt2b7abgh5a6"]
[Wed Jun 11 2014 23:21:57 GMT+0000 (UTC)] <Listener/2> Received data: {"command":"unsubscribe","data":["PHID-TASK-l2dtbs5xrt2b7abgh5a6"]}
[Wed Jun 11 2014 23:21:57 GMT+0000 (UTC)] <Listener/2> Unsubscribed from: ["PHID-TASK-l2dtbs5xrt2b7abgh5a6"]

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5284

Differential Revision: https://secure.phabricator.com/D9492

Details

Committed
epriestley <git@epriestley.com>Jun 12 2014, 05:02
Pushed
aubortJan 31 2017, 17:16
Parents
rPH299510737dfa: Slighly better paste object items
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHcbd95b91b5f1: Implement unsubscription in the Aphlict client. (authored by Joshua Spence <josh@joshuaspence.com>).Jun 12 2014, 05:02