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