@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
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Disconnect rate limits in the PhabricatorStartup shutdown handler

This makes counts more accurate, particularly for connection limits.

+9
+9
support/startup/PhabricatorStartup.php
··· 150 150 * @task hook 151 151 */ 152 152 public static function didShutdown() { 153 + // Disconnect any active rate limits before we shut down. If we don't do 154 + // this, requests which exit early will lock a slot in any active 155 + // connection limits, and won't count for rate limits. 156 + self::disconnectRateLimits(array()); 157 + 153 158 $event = error_get_last(); 154 159 155 160 if (!$event) { ··· 729 734 */ 730 735 public static function disconnectRateLimits(array $request_state) { 731 736 $limits = self::$limits; 737 + 738 + // Remove all limits before disconnecting them so this works properly if 739 + // it runs twice. (We run this automatically as a shutdown handler.) 740 + self::$limits = array(); 732 741 733 742 foreach ($limits as $limit) { 734 743 $limit->didDisconnect($request_state);