mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -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:
|
||||
//Unexpected transfer error - need to reset the bulk transfer interface
|
||||
transfer.buffer().rewind();
|
||||
setErrorMessage("LibUsb Transfer Error - stopping device - status [" + transfer.status() + "] - " +
|
||||
LibUsb.errorName(transfer.status()));
|
||||
return;
|
||||
|
||||
//Only set an error if we're not shutting down
|
||||
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
|
||||
{
|
||||
mThread.join(2000);
|
||||
mThread.interrupt();
|
||||
mThread.join();
|
||||
mThread = null;
|
||||
}
|
||||
catch(Exception e)
|
||||
@@ -183,7 +184,7 @@ public class Dispatcher<E> implements Listener<E>
|
||||
}
|
||||
catch(InterruptedException e)
|
||||
{
|
||||
mLog.error("Buffer processor thread was interrupted");
|
||||
//Normal shutdown is by interrupt
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
@@ -191,6 +192,7 @@ public class Dispatcher<E> implements Listener<E>
|
||||
}
|
||||
}
|
||||
|
||||
//Shutting down - clear the queue
|
||||
mQueue.clear();
|
||||
}
|
||||
catch(Throwable t)
|
||||
|
||||
Reference in New Issue
Block a user