Skip to content

Commit

Permalink
oncrpcsvc: do not send request to execution if service not registered
Browse files Browse the repository at this point in the history
reply 'program not registered' direct from selector thread.

Acked-by: Paul Millar
Target: master
  • Loading branch information
kofemann committed May 23, 2016
1 parent f605d29 commit cc24188
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions oncrpc4j-core/src/main/java/org/dcache/xdr/RpcDispatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ public NextAction handleRead(final FilterChainContext ctx) throws IOException {
_log.debug("processing request {}", call);

final RpcDispatchable program = _programs.get(new OncRpcProgram(prog, vers));
_asyncExecutorService.execute(new Runnable() {
@Override
public void run() {
if (program == null) {
call.failProgramUnavailable();
} else {
if (program == null) {
call.failProgramUnavailable();
} else {
_asyncExecutorService.execute(new Runnable() {
@Override
public void run() {
try {
if (_withSubjectPropagation) {
Subject subject = call.getCredential().getSubject();
Expand Down Expand Up @@ -127,13 +127,13 @@ public void run() {
throw e;
}
}
}

@Override
public String toString() {
return call.toString();
}
});
@Override
public String toString() {
return call.toString();
}
});
}
return ctx.getInvokeAction();
}
}

0 comments on commit cc24188

Please sign in to comment.