diff --git a/lib/soapy/soapy_source_c.cc b/lib/soapy/soapy_source_c.cc index a645361..5c683c9 100644 --- a/lib/soapy/soapy_source_c.cc +++ b/lib/soapy/soapy_source_c.cc @@ -96,9 +96,14 @@ int soapy_source_c::work( int noutput_items, { int flags = 0; long long timeNs = 0; - int ret = _device->readStream( - _stream, &output_items[0], - noutput_items, flags, timeNs); + int ret; + int retries = 1; + + do { + ret = _device->readStream( + _stream, &output_items[0], + noutput_items, flags, timeNs); + } while (retries-- && (ret == SOAPY_SDR_OVERFLOW)); if (ret < 0) return 0; //call again return ret;