mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Fixes problem with starting smack 3.2.0 b2 debugger.
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12089 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
committed by
holger.bergunde
parent
6aedeb214e
commit
5bc85051a3
@ -871,7 +871,29 @@ public final class LoginDialog {
|
||||
}
|
||||
}
|
||||
|
||||
connection.connect();
|
||||
//If we want to use the debug version of smack, we have to check if
|
||||
//we are on the dispatch thread because smack will create an UI
|
||||
if (localPref.isDebuggerEnabled()) {
|
||||
if (EventQueue.isDispatchThread()) {
|
||||
connection.connect();
|
||||
} else {
|
||||
EventQueue.invokeAndWait(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
connection.connect();
|
||||
} catch (XMPPException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
connection.connect();
|
||||
}
|
||||
|
||||
String resource = localPref.getResource();
|
||||
if (!ModelUtil.hasLength(resource)) {
|
||||
|
||||
Reference in New Issue
Block a user