Skip to content

Commit

Permalink
clear data on connect
Browse files Browse the repository at this point in the history
  • Loading branch information
andremussche committed Mar 7, 2014
1 parent 3903dac commit 57017c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions IdHTTPWebsocketClient.pas
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,10 @@ procedure TIdHTTPWebsocketClient.InternalUpgradeToWebsocket(aRaiseException: Boo
//remove from thread during connection handling
TIdWebsocketMultiReadThread.Instance.RemoveClient(Self);

//reset pending data
if IOHandler <> nil then
IOHandler.Clear;

strmResponse := TMemoryStream.Create;
try
//special socket.io handling, see https://github.com/LearnBoost/socket.io-spec
Expand Down

0 comments on commit 57017c8

Please sign in to comment.