[core] Prevent starting two sessions with the same name #314
This commit is contained in:
1 parent
b982640c85
commit
f5bd74dfa1
1 file changed
+5
@@ -105,6 +105,11 @@ export class SessionManagerCore extends SessionManager {
|
||||
//
|
||||
async start(request: SessionStartRequest): Promise<SessionDTO> {
|
||||
this.onlyDefault(request.name);
|
||||
if (this.session) {
|
||||
throw new UnprocessableEntityException(
|
||||
`Session '${this.DEFAULT}' is already started.`,
|
||||
);
|
||||
}
|
||||
|
||||
const name = request.name;
|
||||
this.log.log(`'${name}' - starting session...`);
|
||||
|
||||
Reference in new issue
Block a user