OTC-Response vor Throttling-Warnung schützen
This commit is contained in:
1 parent
9fc85141e0
commit
21e0f48fd5
1 file changed
+1
-1
@@ -10,7 +10,7 @@ function throttle_webhook_channel(string $channel, int $minIntervalSeconds): voi
|
|||||||
$sanitizedChannel = preg_replace('/[^a-z0-9_-]+/i', '_', $channel) ?? 'default';
|
$sanitizedChannel = preg_replace('/[^a-z0-9_-]+/i', '_', $channel) ?? 'default';
|
||||||
$lockPath = sys_get_temp_dir() . '/erp_naurua_webhook_throttle_' . $sanitizedChannel . '.lock';
|
$lockPath = sys_get_temp_dir() . '/erp_naurua_webhook_throttle_' . $sanitizedChannel . '.lock';
|
||||||
|
|
||||||
$handle = fopen($lockPath, 'c+');
|
$handle = @fopen($lockPath, 'c+');
|
||||||
if ($handle === false) {
|
if ($handle === false) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user