mirror of
https://github.com/ChronosX88/Influence-P2P.git
synced 2024-11-22 15:22:18 +00:00
Fixed some bug with null thread handler in XMPPConnectionService.
This commit is contained in:
parent
084a0e6d85
commit
8c52586411
@ -70,14 +70,16 @@ public class XMPPConnectionService extends Service {
|
||||
|
||||
private void onServiceStop() {
|
||||
isThreadAlive = false;
|
||||
threadHandler.post(() -> {
|
||||
if(connection != null) {
|
||||
thread.interrupt();
|
||||
thread = null;
|
||||
connection.disconnect();
|
||||
connection = null;
|
||||
}
|
||||
});
|
||||
if(threadHandler != null) {
|
||||
threadHandler.post(() -> {
|
||||
if(connection != null) {
|
||||
thread.interrupt();
|
||||
thread = null;
|
||||
connection.disconnect();
|
||||
connection = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void createConnection() {
|
||||
|
Loading…
Reference in New Issue
Block a user