Przeglądaj źródła

Merge pull request #4033 from pixelfed/staging

Update FederationController, fix double lock bug
daniel 2 lat temu
rodzic
commit
b555dd30df
2 zmienionych plików z 1 dodań i 6 usunięć
  1. 1 0
      CHANGELOG.md
  2. 0 6
      app/Http/Controllers/FederationController.php

+ 1 - 0
CHANGELOG.md

@@ -72,6 +72,7 @@
 - Update ReplyPipelines, use more efficent reply count calculation ([d4dfa95c](https://github.com/pixelfed/pixelfed/commit/d4dfa95c))
 - Update StatusDelete pipeline, dispatch async ([257c0949](https://github.com/pixelfed/pixelfed/commit/257c0949))
 - Update lexer/extractor to handle banned hashtags ([909a8a5a](https://github.com/pixelfed/pixelfed/commit/909a8a5a))
+- Update FederationController, fix double lock bug ([9fcccca9](https://github.com/pixelfed/pixelfed/commit/9fcccca9))
 -  ([](https://github.com/pixelfed/pixelfed/commit/))
 
 ## [v0.11.4 (2022-10-04)](https://github.com/pixelfed/pixelfed/compare/v0.11.3...v0.11.4)

+ 0 - 6
app/Http/Controllers/FederationController.php

@@ -178,12 +178,6 @@ class FederationController extends Controller
 		} else if( isset($obj['type']) && in_array($obj['type'], ['Follow', 'Accept'])) {
 			dispatch(new InboxValidator($username, $headers, $payload))->onQueue('follow');
 		} else {
-			$lockKey = 'pf:ap:user-inbox:activity:' . hash('sha256', $obj['id']);
-			if(Cache::get($lockKey) !== null) {
-				return;
-			}
-			Cache::put($lockKey, 1, 43200);
-			usleep(5000);
 			dispatch(new InboxValidator($username, $headers, $payload))->onQueue('high');
 		}
 		return;