🐛 Fix gateway
This commit is contained in:
@@ -42,8 +42,8 @@ public class WebSocketController(
|
|||||||
var accountId = Guid.Parse(currentUser.Id!);
|
var accountId = Guid.Parse(currentUser.Id!);
|
||||||
var deviceId = currentSession.Challenge?.DeviceId ?? Guid.NewGuid().ToString();
|
var deviceId = currentSession.Challenge?.DeviceId ?? Guid.NewGuid().ToString();
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(deviceId))
|
// TODO temporary fix due to the server update
|
||||||
return BadRequest("Unable to get device ID from session.");
|
if (string.IsNullOrEmpty(deviceId)) deviceId = Guid.NewGuid().ToString().Replace("-", "");
|
||||||
if (deviceAlt is not null)
|
if (deviceAlt is not null)
|
||||||
deviceId = $"{deviceId}+{deviceAlt}";
|
deviceId = $"{deviceId}+{deviceAlt}";
|
||||||
|
|
||||||
@@ -101,9 +101,9 @@ public class WebSocketController(
|
|||||||
}
|
}
|
||||||
catch (WebSocketException ex)
|
catch (WebSocketException ex)
|
||||||
when (ex.Message.Contains(
|
when (ex.Message.Contains(
|
||||||
"The remote party closed the WebSocket connection without completing the close handshake"
|
"The remote party closed the WebSocket connection without completing the close handshake"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
logger.LogDebug(
|
logger.LogDebug(
|
||||||
"WebSocket disconnected with user @{UserName}#{UserId} and device #{DeviceId} - client closed connection without proper handshake",
|
"WebSocket disconnected with user @{UserName}#{UserId} and device #{DeviceId} - client closed connection without proper handshake",
|
||||||
@@ -187,4 +187,4 @@ public class WebSocketController(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user