prometheus + load-testing
This commit is contained in:
@@ -16,6 +16,7 @@ export const handleConnectPilot =
|
||||
debug: boolean;
|
||||
}) => {
|
||||
try {
|
||||
console.log("Connecting pilot:", socket.id, "Station ID:", stationId, "Debug mode:", debug);
|
||||
if (!stationId) return Error("Station ID is required");
|
||||
const user: User = socket.data.user; // User ID aus dem JWT-Token
|
||||
const userId = socket.data.user.id; // User ID aus dem JWT-Token
|
||||
@@ -43,7 +44,7 @@ export const handleConnectPilot =
|
||||
},
|
||||
});
|
||||
|
||||
if (existingConnection) {
|
||||
if (existingConnection && !debug) {
|
||||
await io.to(`user:${user.id}`).emit("force-disconnect", "double-connection");
|
||||
await prisma.connectedAircraft.updateMany({
|
||||
where: {
|
||||
|
||||
Reference in New Issue
Block a user