From 1623fb695280ea8a88271058d15cd4f5c5badbc8 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Thu, 11 Sep 2014 10:18:34 +0100 Subject: [PATCH] Only update the dns cache on new lookups (Fixes #1221) This causes the cached entry to be looked up every 5 minutes instead of the previous system where it was kept as long as it was used. This fixes an issue where after Mojang's session servers go down the ip address tends to change. This caused bungee to repeatedly hit the old (inactive) one which with the previous system would be re-cached every time someone tried to connect --- proxy/src/main/java/net/md_5/bungee/http/HttpClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/src/main/java/net/md_5/bungee/http/HttpClient.java b/proxy/src/main/java/net/md_5/bungee/http/HttpClient.java index f8755e5e..93b28b1d 100644 --- a/proxy/src/main/java/net/md_5/bungee/http/HttpClient.java +++ b/proxy/src/main/java/net/md_5/bungee/http/HttpClient.java @@ -68,8 +68,8 @@ public class HttpClient callback.done( null, ex ); return; } + addressCache.put( uri.getHost(), inetHost ); } - addressCache.put( uri.getHost(), inetHost ); ChannelFutureListener future = new ChannelFutureListener() {