diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 9e5757e185..6d3c529843 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -477,7 +477,7 @@ return array( 'rsrc/js/phuix/PHUIXActionListView.js' => 'b5c256b8', 'rsrc/js/phuix/PHUIXActionView.js' => '6e8cefa4', 'rsrc/js/phuix/PHUIXDropdownMenu.js' => 'bd4c8dca', - 'rsrc/swf/aphlict.swf' => '2dea6ddc', + 'rsrc/swf/aphlict.swf' => '14d5aa2e', ), 'symbols' => array( diff --git a/support/aphlict/client/src/AphlictMaster.as b/support/aphlict/client/src/AphlictMaster.as index cb8d6c8fa4..8f8255bac4 100644 --- a/support/aphlict/client/src/AphlictMaster.as +++ b/support/aphlict/client/src/AphlictMaster.as @@ -88,6 +88,9 @@ package { if (new Date().getTime() - checkin > AphlictMaster.PURGE_INTERVAL) { this.log('Purging client: ' + client); delete this.clients[client]; + + this.log('Removing client subscriptions: ' + client); + this.unsubscribeAll(client); } } } @@ -163,10 +166,29 @@ package { } } + private function getSubscriptions(client:String):Array { + var subscriptions = new Array(); + + for (var phid:String in this.subscriptions) { + var clients = this.subscriptions[phid]; + if (clients[client]) { + subscriptions.push(phid); + } + } + + return subscriptions; + } + + public function unsubscribeAll(client:String):void { + this.unsubscribe(client, this.getSubscriptions(client)); + } + public function unsubscribe(client:String, phids:Array):void { var oldPHIDs = new Array(); - for (var phid:String in phids) { + for (var i:String in phids) { + var phid = phids[i]; + if (!this.subscriptions[phid]) { continue; } diff --git a/webroot/rsrc/swf/aphlict.swf b/webroot/rsrc/swf/aphlict.swf index 51be4530c3..9dc9c59565 100644 Binary files a/webroot/rsrc/swf/aphlict.swf and b/webroot/rsrc/swf/aphlict.swf differ