aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp/src/main/java/com/juick/components/CleaningUp.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-10-09 15:27:48 +0300
committerGravatar Vitaly Takmazov2017-10-10 09:37:31 +0300
commit448fc7e84732422011186a9a4633c345e9c6208e (patch)
tree7ec23a9f29939fecf6456956ead6cebd1338871d /juick-xmpp/src/main/java/com/juick/components/CleaningUp.java
parent443daa747298de315840cdd6ee6992519707e61a (diff)
xmpp:ConnectionOut -> StreamServerDialback
Diffstat (limited to 'juick-xmpp/src/main/java/com/juick/components/CleaningUp.java')
-rw-r--r--juick-xmpp/src/main/java/com/juick/components/CleaningUp.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-xmpp/src/main/java/com/juick/components/CleaningUp.java b/juick-xmpp/src/main/java/com/juick/components/CleaningUp.java
index 16747ea4..a96b7c35 100644
--- a/juick-xmpp/src/main/java/com/juick/components/CleaningUp.java
+++ b/juick-xmpp/src/main/java/com/juick/components/CleaningUp.java
@@ -43,10 +43,10 @@ public class CleaningUp {
@Scheduled(fixedDelay = 10000)
public void cleanUp() {
Instant now = Instant.now();
- xmpp.getOutConnections().stream().filter(c -> Duration.between(now, c.updated).toMinutes() > TIMEOUT_MINUTES)
+ xmpp.getOutConnections().keySet().stream().filter(c -> Duration.between(now, c.getUpdated()).toMinutes() > TIMEOUT_MINUTES)
.forEach(c -> {
logger.info("closing idle outgoing connection to {}", c.to);
- c.closeConnection();
+ c.logoff();
xmpp.getOutConnections().remove(c);
});