diff --git a/src/Control/Actions/ServerDeleteAction.php b/src/Control/Actions/ServerDeleteAction.php index 17b6ea2..d856ccb 100644 --- a/src/Control/Actions/ServerDeleteAction.php +++ b/src/Control/Actions/ServerDeleteAction.php @@ -14,6 +14,12 @@ final class ServerDeleteAction extends AbstractAction $dataResult = $this->ts->getInstance()->serverDelete($sid); + // remove selected server from session + if ($this->session->exists('sid') && $this->session->get('sid') == $sid) { + $this->session->delete('sid'); + $this->session->delete('name'); + } + $this->flash->addMessage('success', $this->translator->trans('done')); return $response->withRedirect('/servers'); }