From 57077ab1f38e2c76aaea92c7fd0998482eb6c66d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Mussche?= Date: Fri, 14 Mar 2014 09:37:30 +0100 Subject: [PATCH] conditional outputdebugstring --- IdHTTPWebsocketClient.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/IdHTTPWebsocketClient.pas b/IdHTTPWebsocketClient.pas index acf736f..e88edff 100644 --- a/IdHTTPWebsocketClient.pas +++ b/IdHTTPWebsocketClient.pas @@ -245,7 +245,10 @@ end; procedure TIdHTTPWebsocketClient.AsyncDispatchEvent(const aEvent: string); begin - OutputDebugString(PChar('AsyncDispatchEvent: ' + aEvent) ); + {$IFDEF DEBUG_WS} + if DebugHook <> 0 then + OutputDebugString(PChar('AsyncDispatchEvent: ' + aEvent) ); + {$ENDIF} //if not Assigned(OnTextData) then Exit; //events during dispatch? channel is busy so offload event dispatching to different thread!