Skip to content

Commit

Permalink
we don't need to remove the job manually here, even if we ask once mo…
Browse files Browse the repository at this point in the history
…re the other server will decline and the background job will be removed

Signed-off-by: Bjoern Schiessle <[email protected]>
  • Loading branch information
schiessle committed Jul 28, 2017
1 parent 04e8282 commit 0560bd5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
9 changes: 0 additions & 9 deletions apps/federation/lib/Controller/OCSAuthAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,6 @@ public function requestSharedSecret($url, $token) {
throw new OCSForbiddenException();
}

// we ask for the shared secret so we no longer have to ask the other server
// to request the shared secret
$this->jobList->remove('OCA\Federation\BackgroundJob\RequestSharedSecret',
[
'url' => $url,
'token' => $localToken
]
);

$this->jobList->add(
'OCA\Federation\BackgroundJob\GetSharedSecret',
[
Expand Down
2 changes: 0 additions & 2 deletions apps/federation/tests/Controller/OCSAuthAPIControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ public function testRequestSharedSecret($token, $localToken, $isTrustedServer, $
if ($ok) {
$this->jobList->expects($this->once())->method('add')
->with('OCA\Federation\BackgroundJob\GetSharedSecret', ['url' => $url, 'token' => $token, 'created' => $this->currentTime]);
$this->jobList->expects($this->once())->method('remove')
->with('OCA\Federation\BackgroundJob\RequestSharedSecret', ['url' => $url, 'token' => $localToken]);
} else {
$this->jobList->expects($this->never())->method('add');
$this->jobList->expects($this->never())->method('remove');
Expand Down

0 comments on commit 0560bd5

Please sign in to comment.