anchor.diff:    begin
       SendString('bye');
       Socket.CloseSocket();
  -    FState := hsDisconnected;
  -  end;
  +  end;
  +
  +  FState := hsDisconnected;
  +  FEncrypted := False;
   
     if Assigned(Socket) then
       FreeAndNil(Socket);
  
positive.code:           FEncrypted := False;
            Socket.SSLDoShutdown();
            Exit(False);
          end;
  
          Reply := ReceiveString();
  
          Log('encrypt reply: ' + Reply);
          if ProcessReply(Reply, Msg) then
          begin
            FEncrypted := True;
          end
          else
            FEncrypted := False;
        end
        else
        begin
  
negative.code:   HGD_PROTO_MAJOR: integer = 17;
    HGD_PROTO_MINOR: integer = 0;
    HGD_NUM_TRACK_FIELDS: integer = 14;
    HGD_MAX_LINE: integer = 512;
    BLOCK_SIZE: Int64 = 512 * 1024;
  
    //The hgd protocol is telnet based, use CRLF as LineEnding
  