diff options
Diffstat (limited to 'lib/Service/SessionService.php')
-rw-r--r-- | lib/Service/SessionService.php | 13 |
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 { |