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;
|
FInBufEnd := 0;
|
||||||
|
|
||||||
If Drain Then
|
If Drain Then
|
||||||
While DataWaiting Do
|
While DataWaiting Do Begin
|
||||||
ReadBuf(Buf, SizeOf(Buf));
|
ReadBuf(Buf, SizeOf(Buf));
|
||||||
|
If FInBufEnd <= 0 Then Break;
|
||||||
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TIOBase.DataWaiting : Boolean;
|
Function TIOBase.DataWaiting : Boolean;
|
||||||
Begin
|
Begin
|
||||||
|
Result := False;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TIOBase.WriteBuf (Var Buf; Len: LongInt) : LongInt;
|
Function TIOBase.WriteBuf (Var Buf; Len: LongInt) : LongInt;
|
||||||
|
|
Loading…
Reference in New Issue