Stop updater when the connection is interrupted.
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sat, 17 Mar 2012 02:02:22 +0000 (03:02 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sat, 17 Mar 2012 02:02:22 +0000 (03:02 +0100)
src/de/todesbaum/jsite/application/UpdateChecker.java

index 276a07b..5e61a76 100644 (file)
@@ -215,6 +215,9 @@ public class UpdateChecker implements Runnable {
                                while (!stop) {
                                        Message message = client.readMessage();
                                        logger.log(Level.FINEST, "Received message: " + message);
+                                       if (message == null) {
+                                               break;
+                                       }
                                        if ("GetFailed".equals(message.getName())) {
                                                if ("27".equals(message.get("code"))) {
                                                        String editionString = message.get("redirecturi").split("/")[2];