Skip to content

Commit

Permalink
checkPermission before adding to channels
Browse files Browse the repository at this point in the history
close #602
  • Loading branch information
ar committed Jul 23, 2024
1 parent 73e6213 commit 584da0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jpos/src/main/java/org/jpos/iso/ISOServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 584da0f

Please sign in to comment.