Hi,
Please look at the code below.
.
.
.
      try
           try
                Query.Open;
                OnDataSent := DataWasSent;
                // DataWasSent sets "SentOk" to True
                while not Query.EOF do
                begin
                     Rec    := PrepareRec(true);
                     Rec.AllDist := Rec.AllDist - D;
                     Rec.Count := RecCount;
                     SentOk := false;
                     Send(@Rec, SizeOf(TRec));
                     repeat
                          ProcessMessages;
                     until SentOk;
                     Query.Next;
                end;
           except
                on E: Exception do
                     Display(ExecuteCommand1 - %s', [E.Message]);
           end
      finally
           Query.Close;
           OnDataSent := nil
      end;

The code is executed from OnClientDataAvailable of an TWSocketServer. 
When the execution reach the "repeat .. until SentOk", on 
ProcessMessages the code is reentered a second time.

What am I doing wrong?

10x,
Ionut Muntean
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to