里面提到了两种解决方案 Change this in last portion of ReadFromStack():
... until (LByteCount <> 0) or (Connected = False); ...
to:
... until (LByteCount <> 0) or (Connected = False) or (Result = -1); ...
还有一种 Current faulty situation in ReadFromStack() at Line 427 (Beta 9.0.3-B):
... // Timeout if ARaiseExceptionOnTimeout then begin raise EIdReadTimeout.Create(RSReadTimeout); end; Result := -1; ...
Change this to:
... // Timeout Result := -1; // MOVED! if ARaiseExceptionOnTimeout then begin raise EIdReadTimeout.Create(RSReadTimeout); end else // ADDED! break; // ADDED! ...