Fix for PurgeInputData when in a drain state, that could potentially cause a deadlock.
This commit is contained in:
parent
cee19d6898
commit
29ff598b3a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue