mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-16 10:37:26 -05:00
Resolves #905. Adds try/catch block to duplicate call detection processing block to ensure that any error generated during duplicate call processing doesn't kill the processing thread and cause a queue-backup memory leak. (#918)
Co-authored-by: Denny <denny@denny-desktop>
This commit is contained in:
@@ -230,6 +230,8 @@ public class DuplicateCallDetector implements Listener<AudioSegment>
|
|||||||
* Processes audio segments to detect duplicates
|
* Processes audio segments to detect duplicates
|
||||||
*/
|
*/
|
||||||
private void process()
|
private void process()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
//Transfer in newly arrived audio segments
|
//Transfer in newly arrived audio segments
|
||||||
mAudioSegmentQueue.drainTo(mAudioSegments);
|
mAudioSegmentQueue.drainTo(mAudioSegments);
|
||||||
@@ -306,5 +308,11 @@ public class DuplicateCallDetector implements Listener<AudioSegment>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch(Throwable t)
|
||||||
|
{
|
||||||
|
mLog.error("Unknown error while processing audio segments for duplicate call detection. Please report " +
|
||||||
|
"this to the developer.", t);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user