Select the types of activity you want to include in your feed.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
···150150 * @task hook
151151 */
152152 public static function didShutdown() {
153153+ // Disconnect any active rate limits before we shut down. If we don't do
154154+ // this, requests which exit early will lock a slot in any active
155155+ // connection limits, and won't count for rate limits.
156156+ self::disconnectRateLimits(array());
157157+153158 $event = error_get_last();
154159155160 if (!$event) {
···729734 */
730735 public static function disconnectRateLimits(array $request_state) {
731736 $limits = self::$limits;
737737+738738+ // Remove all limits before disconnecting them so this works properly if
739739+ // it runs twice. (We run this automatically as a shutdown handler.)
740740+ self::$limits = array();
732741733742 foreach ($limits as $limit) {
734743 $limit->didDisconnect($request_state);