Handle InterruptedException by Thread.interrupt()

Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
camera2
Leo Ma 9 years ago
parent 2b83e5656d
commit 236636ca74

@ -191,9 +191,8 @@ public class SrsRtmp {
try { try {
worker.join(); worker.join();
} catch (InterruptedException e) { } catch (InterruptedException e) {
Log.i(TAG, "worker: join thread failed.");
e.printStackTrace(); e.printStackTrace();
worker.stop(); worker.interrupt();
} }
worker = null; worker = null;
publisher = null; publisher = null;

@ -64,6 +64,7 @@ public class ReadThread extends Thread {
Thread.getDefaultUncaughtExceptionHandler().uncaughtException(this, ioe); Thread.getDefaultUncaughtExceptionHandler().uncaughtException(this, ioe);
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
ie.printStackTrace(); ie.printStackTrace();
this.interrupt();
} }
} }
// Close inputstream // Close inputstream

@ -394,6 +394,7 @@ public class RtmpConnection implements RtmpPublisher, PacketRxHandler, ThreadCon
thread.join(); thread.join();
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
ie.printStackTrace(); ie.printStackTrace();
thread.interrupt();
} }
} }
} }

Loading…
Cancel
Save