aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com/juick/api/ApiServer.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-api/src/main/java/com/juick/api/ApiServer.java')
-rw-r--r--juick-api/src/main/java/com/juick/api/ApiServer.java15
1 files changed, 1 insertions, 14 deletions
diff --git a/juick-api/src/main/java/com/juick/api/ApiServer.java b/juick-api/src/main/java/com/juick/api/ApiServer.java
index f4dd4d99..a8e2db85 100644
--- a/juick-api/src/main/java/com/juick/api/ApiServer.java
+++ b/juick-api/src/main/java/com/juick/api/ApiServer.java
@@ -17,13 +17,10 @@
package com.juick.api;
import com.juick.User;
-import com.juick.server.component.DisconnectedEvent;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.ApplicationListener;
-import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.socket.client.WebSocketConnectionManager;
import rocks.xmpp.addr.Jid;
import rocks.xmpp.core.XmppException;
@@ -34,7 +31,6 @@ import rocks.xmpp.core.stanza.model.Message;
import rocks.xmpp.extensions.component.accept.ExternalComponent;
import rocks.xmpp.extensions.oob.model.x.OobX;
-import javax.annotation.Nonnull;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import java.net.URI;
@@ -43,7 +39,7 @@ import java.net.URISyntaxException;
/**
* @author Ugnich Anton
*/
-public class ApiServer implements ApplicationListener<DisconnectedEvent>, AutoCloseable {
+public class ApiServer implements AutoCloseable {
private static Logger logger = LoggerFactory.getLogger(ApiServer.class);
private ExternalComponent xmpp;
@@ -58,8 +54,6 @@ public class ApiServer implements ApplicationListener<DisconnectedEvent>, AutoCl
private int xmppPort;
@Value("${xmpp_disabled:false}")
private boolean isXmppDisabled;
- @Inject
- private WebSocketConnectionManager webSocketConnectionManager;
@PostConstruct
public void init() {
@@ -114,11 +108,4 @@ public class ApiServer implements ApplicationListener<DisconnectedEvent>, AutoCl
logger.warn("attachment error", e1);
}
}
-
- @Override
- public void onApplicationEvent(@Nonnull DisconnectedEvent event) {
- logger.info("retrying...");
- webSocketConnectionManager.stop();
- webSocketConnectionManager.start();
- }
}