Ver código fonte
merged branch arnapou/2.0 (PR #3610)
Commits
-------
fbed9ff Update src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
Discussion
----------
Branch 2.0 - Correct bad HttpCache behaviour when waiting for unlock.
I read the class Symfony\Component\HttpKernel\HttpCache\HttpCache and I found something which looks like a bug lines 518-520 (in lock method) :
$wait = 0;
while (is_file($lock) && $wait < 5000000) {
usleep($wait += 50000);
}
This code can wait at maximum 50000+100000+150000+.... 4950000 µs = more than 250 seconds !
I corrected like that :
$wait = 0;
while (is_file($lock) && $wait < 5000000) {
usleep(50000);
$wait += 50000
}
This code will wait 5 sec maximum.
This is more coherent if we read the following lines of this method.
---------------------------------------------------------------------------
by arnapou at 2012-03-15T20:09:13Z
Hope I succeded to do a correct PR.
One hour of manipulation in Github for 2 lines of code let me a bitter taste on the tongue...
I was closed to tell you "Do It Yourself" ... what a waste of time...
This interface is not obvious, even if we had already worked on svn/git on *nix.