mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
Improve logic for logging into the websocket of the target node
This commit is contained in:
@@ -112,7 +112,6 @@ class ServerTransferController extends Controller
|
||||
|
||||
// Unsuspend the server and don't continue the transfer.
|
||||
if (! $request->input('successful')) {
|
||||
//$this->suspensionService->toggle($server, 'unsuspend');
|
||||
$server->transfer->forceFill([
|
||||
'successful' => false,
|
||||
])->saveOrFail();
|
||||
@@ -142,6 +141,12 @@ class ServerTransferController extends Controller
|
||||
->relatedTo($server->uuid, true)
|
||||
->getToken($signer, new Key($server->node->getDecryptedKey()));
|
||||
|
||||
// Update the archived field on the transfer to make clients connect to the websocket
|
||||
// on the new node to be able to receive transfer logs.
|
||||
$server->transfer->forceFill([
|
||||
'archived' => true,
|
||||
])->saveOrFail();
|
||||
|
||||
// On the daemon transfer repository, make sure to set the node after the server
|
||||
// because setServer() tells the repository to use the server's node and not the one
|
||||
// we want to specify.
|
||||
|
||||
Reference in New Issue
Block a user