style: amend 278c807fa3
This commit is contained in:
parent
e21dfd17ff
commit
9c938bc730
@ -161,13 +161,19 @@ internal sealed class SessionService : BackgroundService, ISessionService
|
||||
Span<byte> sessionAddressBytes = stackalloc byte[16];
|
||||
if (!remoteIpAddress.TryWriteBytes(remoteAddressBytes, out _) ||
|
||||
!session.IpAddress.TryWriteBytes(sessionAddressBytes, out _))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!remoteAddressBytes.SequenceEqual(sessionAddressBytes))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_userService.TryGetUser(session.UserId, out _))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user