bug in current devbuild - IdIOHandler.pas - procedure TIdIOHandler.Open;

Giganews Newsgroups
Subject: bug in current devbuild - IdIOHandler.pas - procedure TIdIOHandler.Open;
Posted by:  Ben Taylor (to_b…@yahoo.com)
Date: Sat, 05 Jun 2004

should be:

procedure TIdIOHandler.Open;
begin
  FOpened := True;
  FClosedGracefully := False;
  // Recreate FRecvBuffer
  FreeAndNil(FRecvBuffer);
  FRecvBuffer := TIdBuffer.Create;
  //
  FreeAndNil(FInputBuffer); // add this line!
  FInputBuffer := TIdBuffer.Create(BufferRemoveNotify);
end;

otherwise an instance of TIdBuffer is lost each time .Open is called.
basically it should be handled the same as the FRecvBuffer a couple of
lines up..

comments?

thanks,
ben

Replies