What steps will reproduce the problem?
1. XMPP connection gets disconnected due to network, server error.
2. When a message gets send, a disconnected XMPPConnection is returned.
What is the expected output? What do you see instead?
Expect connected to be re-established and message to be sent. Instead I see:
10:56:51.538 ERROR o.o.c.s.ScriptExecutionThread[:70] - Error during the
execution of rule 'Alarm notification': Not connected to server.
What version of the product are you using? On what operating system?
1.2.0 - from repo.
Please provide any additional information below.
A check for XMPPConnection.isConnected() should be added in
XMPPConnect.getConnection()
https://code.google.com/p/openhab/source/browse/bundles/io/org.openhab.io.net/sr
c/main/java/org/openhab/io/net/internal/jabber/XMPPConnect.java
Suggestion:
public static XMPPConnection getConnection() throws NotInitializedException {
//assuming connection can't be null
if(!initialized || !connection.isConnected()) {
establishConnection();
if(!initialized) {
throw new NotInitializedException();
}
}
return connection;
}
Original issue reported on code.google.com by t...@ducbase.com on 2 Apr 2013 at 2:26
Original issue reported on code.google.com by
t...@ducbase.com
on 2 Apr 2013 at 2:26