Skip to content

Commit c3c8d03

Browse files
authored
fix(http): use exclusive locks for file session writes (#1366)
1 parent d8c502d commit c3c8d03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/http/src/Session/Managers/FileSessionManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private function persist(SessionId $id, ?array $data = null): Session
123123
$session->data = $data;
124124
}
125125

126-
Filesystem\write_file($path, serialize($session));
126+
Filesystem\write_file($path, serialize($session), LOCK_EX);
127127

128128
return $session;
129129
}

0 commit comments

Comments
 (0)