cvmts: Fix protocol error disconnection behavior so it actually works

This commit is contained in:
modeco80
2025-03-06 17:08:58 -05:00
parent b015274e3b
commit 53dd05ccc2

View File

@@ -708,9 +708,14 @@ export default class CollabVMServer {
break; break;
} }
} catch (err) { } catch (err) {
// No this.logger.error({
this.logger.error(`User ${user?.IP.address} ${user?.username ? `with username ${user?.username}` : ''} sent broken Guacamole: ${err as Error}`); ip: client.IP.address,
user?.kick(); username: client.username,
error_message: (err as Error).message
}, 'Error in CollabVMServer#onMessage.');
// should probably only do this for protocol errors
client.kick();
} }
} }