🔒 Skip unauthenticated sockets in admin broadcasts
Any connection that had not finished logging in has no account, and dereferencing it aborted the broadcast for all remaining admins.
This commit is contained in:
@@ -98,7 +98,8 @@ begin
|
||||
while CEDServerInstance.TCPServer.IterNext do
|
||||
begin
|
||||
netState := TNetState(CEDServerInstance.TCPServer.Iterator.UserData);
|
||||
if (netState <> nil) and (netState.Account.AccessLevel >= AAccessLevel) then
|
||||
if (netState <> nil) and (netState.Account <> nil) and
|
||||
(netState.Account.AccessLevel >= AAccessLevel) then
|
||||
CEDServerInstance.SendPacket(netState, APacket, False);
|
||||
end;
|
||||
APacket.Free;
|
||||
|
||||
Reference in New Issue
Block a user