mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-14 09:37:36 -05:00
Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
@@ -643,9 +643,14 @@ public abstract class USBTunerController extends TunerController
|
|||||||
default:
|
default:
|
||||||
//Unexpected transfer error - need to reset the bulk transfer interface
|
//Unexpected transfer error - need to reset the bulk transfer interface
|
||||||
transfer.buffer().rewind();
|
transfer.buffer().rewind();
|
||||||
setErrorMessage("LibUsb Transfer Error - stopping device - status [" + transfer.status() + "] - " +
|
|
||||||
LibUsb.errorName(transfer.status()));
|
//Only set an error if we're not shutting down
|
||||||
return;
|
if(mAutoResubmitTransfers)
|
||||||
|
{
|
||||||
|
setErrorMessage("LibUsb Transfer Error - stopping device - status [" + transfer.status() + "] - " +
|
||||||
|
LibUsb.errorName(transfer.status()));
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,8 @@ public class Dispatcher<E> implements Listener<E>
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
mThread.join(2000);
|
mThread.interrupt();
|
||||||
|
mThread.join();
|
||||||
mThread = null;
|
mThread = null;
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
@@ -183,7 +184,7 @@ public class Dispatcher<E> implements Listener<E>
|
|||||||
}
|
}
|
||||||
catch(InterruptedException e)
|
catch(InterruptedException e)
|
||||||
{
|
{
|
||||||
mLog.error("Buffer processor thread was interrupted");
|
//Normal shutdown is by interrupt
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
@@ -191,6 +192,7 @@ public class Dispatcher<E> implements Listener<E>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Shutting down - clear the queue
|
||||||
mQueue.clear();
|
mQueue.clear();
|
||||||
}
|
}
|
||||||
catch(Throwable t)
|
catch(Throwable t)
|
||||||
|
|||||||
Reference in New Issue
Block a user