diff options
author | 2018-12-30 23:05:16 +0300 | |
---|---|---|
committer | 2018-12-30 23:05:16 +0300 | |
commit | a201bab42facd56290195703f6847e1a29033fb4 (patch) | |
tree | 1ae224fe17c9d32f3451869320bb4146f0f1b62e /src/main/java/com/juick/server/xmpp/s2s | |
parent | 8835817a16b828dc9230dc8962329ffefb07eead (diff) |
Name XMPP threads
Diffstat (limited to 'src/main/java/com/juick/server/xmpp/s2s')
-rw-r--r-- | src/main/java/com/juick/server/xmpp/s2s/ConnectionIn.java | 1 | ||||
-rw-r--r-- | src/main/java/com/juick/server/xmpp/s2s/ConnectionOut.java | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/com/juick/server/xmpp/s2s/ConnectionIn.java b/src/main/java/com/juick/server/xmpp/s2s/ConnectionIn.java index 72c3ba8d..3929a69f 100644 --- a/src/main/java/com/juick/server/xmpp/s2s/ConnectionIn.java +++ b/src/main/java/com/juick/server/xmpp/s2s/ConnectionIn.java @@ -69,6 +69,7 @@ public class ConnectionIn extends Connection implements Runnable { } boolean xmppversionnew = parser.getAttributeValue(null, "version") != null; String from = parser.getAttributeValue(null, "from"); + Thread.currentThread().setName(String.format("XMPP S2S IN %s - %d", from, Thread.currentThread().getId())); if (Arrays.asList(xmpp.bannedHosts).contains(from)) { closeConnection(); diff --git a/src/main/java/com/juick/server/xmpp/s2s/ConnectionOut.java b/src/main/java/com/juick/server/xmpp/s2s/ConnectionOut.java index be485ab1..2b919da4 100644 --- a/src/main/java/com/juick/server/xmpp/s2s/ConnectionOut.java +++ b/src/main/java/com/juick/server/xmpp/s2s/ConnectionOut.java @@ -65,6 +65,7 @@ public class ConnectionOut extends Stream { this.dbKey = DialbackUtils.generateDialbackKey(generator.generate(15), to, from, streamID); } streamID = UUID.randomUUID().toString(); + Thread.currentThread().setName(String.format("XMPP S2S OUT %s - %d", to.toEscapedString(), Thread.currentThread().getId())); } public void sendOpenStream() throws IOException { |