Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-05-22 16:53:47 +0300
committerJulius Härtl <jus@bitgrid.net>2019-05-23 00:09:57 +0300
commitdeb2d346d8f6da6f7b8bf7431ceeff5d81d1927c (patch)
tree561dbc7558cd4ad3706bfee398c03dd08a318cdd /lib/Service/SessionService.php
parent69ea341e52679645b187a01f3f3b824416e64e6e (diff)
Session cleanup
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/Service/SessionService.php')
-rw-r--r--lib/Service/SessionService.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Service/SessionService.php b/lib/Service/SessionService.php
index c46a1fef4..a23447914 100644
--- a/lib/Service/SessionService.php
+++ b/lib/Service/SessionService.php
@@ -64,13 +64,12 @@ class SessionService {
return $this->sessionMapper->insert($session);
}
- /**
- * @throws DoesNotExistException
- */
- public function closeSession($documentId, $sessionId, $token): void {
- $session = $this->sessionMapper->find($documentId, $sessionId, $token);
- // TODO: check for unpersisited changes from session?
- $this->sessionMapper->delete($session);
+ public function closeSession(int $documentId, int $sessionId, string $token): void {
+ try {
+ $session = $this->sessionMapper->find($documentId, $sessionId, $token);
+ $this->sessionMapper->delete($session);
+ } catch (DoesNotExistException $e) {
+ }
}
public function getActiveSessions($documentId): array {