From 584da0f4519a80e93fc774888f181b700f19d1b8 Mon Sep 17 00:00:00 2001 From: Alejandro Revilla Date: Mon, 22 Jul 2024 22:30:11 -0300 Subject: [PATCH] checkPermission before adding to channels close #602 --- jpos/src/main/java/org/jpos/iso/ISOServer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jpos/src/main/java/org/jpos/iso/ISOServer.java b/jpos/src/main/java/org/jpos/iso/ISOServer.java index d0521189c6..0ee1af4323 100644 --- a/jpos/src/main/java/org/jpos/iso/ISOServer.java +++ b/jpos/src/main/java/org/jpos/iso/ISOServer.java @@ -339,6 +339,9 @@ public void run() { } } try { + WeakReference wr = new WeakReference (channel); + channels.put (channel.getName(), wr); + channels.put (LAST, wr); for (;;) { try { ISOMsg m = channel.receive(); @@ -508,9 +511,6 @@ public void run() { if (cnt[CONNECT]++ % 100 == 0) { purgeChannels (); } - WeakReference wr = new WeakReference (channel); - channels.put (channel.getName(), wr); - channels.put (LAST, wr); pool.execute (createSession(channel)); setChanged (); notifyObservers (this);