File tree 1 file changed +5
-3
lines changed
src/Symfony/Component/Lock/Store
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ public function waitAndSave(Key $key)
71
71
72
72
private function lock (Key $ key , bool $ blocking )
73
73
{
74
- // The lock is maybe already acquired.
74
+ // the lock is maybe already acquired.
75
75
if ($ key ->hasState (__CLASS__ )) {
76
76
return ;
77
77
}
@@ -102,7 +102,7 @@ private function lock(Key $key, bool $blocking)
102
102
}
103
103
104
104
// store the release statement in the state
105
- $ releaseStmt = $ this ->connection ->prepare ('SELECT RELEASE_LOCK(:key) ' );
105
+ $ releaseStmt = $ this ->connection ->prepare ('DO RELEASE_LOCK(:key) ' );
106
106
$ releaseStmt ->bindValue (':key ' , $ storedKey , \PDO ::PARAM_STR );
107
107
108
108
$ key ->setState (__CLASS__ , $ releaseStmt );
@@ -113,7 +113,9 @@ private function lock(Key $key, bool $blocking)
113
113
*/
114
114
public function putOffExpiration (Key $ key , $ ttl )
115
115
{
116
- // do nothing, the GET_LOCK locks forever, until the session terminates.
116
+ // the GET_LOCK locks forever, until the session terminates.
117
+ // keep the session open
118
+ $ this ->connection ->exec ('DO 1 ' );
117
119
}
118
120
119
121
/**
You can’t perform that action at this time.
0 commit comments