Open maximzasorin opened 6 years ago
Did you remove $bucket->bootstrap(10);
?
Had the same problem on Windows but it went away when I commented out the second file open in the bootstrap method. https://github.com/bandwidth-throttle/token-bucket/blob/5038add13124fa72f7c606ed11524dfde019658f/classes/storage/FileStorage.php#L84
For some reason with PHP 8.1.6 and that commit on my windows machine is not working, if i comment that line it works. Someone know why?
When I use next code for bootstrap token bucket:
On Linux and macOS all works well, but in Windows I get an error:
Maybe it's because the file opens twice, first, in
FileStorage::__construct
, then file locked byflock
and then file opens inFileStorage::bootstrap
method.