Skip to content

Commit

Permalink
Ajustes
Browse files Browse the repository at this point in the history
Retomado a exclusão indevida do tratamento de eventos;
  • Loading branch information
cayque10 committed May 21, 2024
1 parent 52cc2f6 commit 3fcd8b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Bird.Socket.Client.pas
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,14 @@ procedure TBirdSocketClient.AddEventListener(const AEventType: TEventType; const
case AEventType of
TEventType.OPEN:
begin
if Assigned(FOnOpen) then
raise Exception.Create('The open event listener is already assigned!');
FOnOpen := AEvent;
end;
TEventType.MESSAGE:
begin
if Assigned(FOnMessage) then
raise Exception.Create('The message event listener is already assigned!');
FOnMessage := AEvent;
end;
else
Expand Down

0 comments on commit 3fcd8b3

Please sign in to comment.