Fix for PurgeInputData when in a drain state, that could potentially cause a deadlock.

This commit is contained in:
mysticbbs 2013-01-24 11:49:10 -05:00
parent cee19d6898
commit 29ff598b3a
1 changed files with 4 additions and 1 deletions

View File

@ -64,12 +64,15 @@ Begin
FInBufEnd := 0;
If Drain Then
While DataWaiting Do
While DataWaiting Do Begin
ReadBuf(Buf, SizeOf(Buf));
If FInBufEnd <= 0 Then Break;
End;
End;
Function TIOBase.DataWaiting : Boolean;
Begin
Result := False;
End;
Function TIOBase.WriteBuf (Var Buf; Len: LongInt) : LongInt;