diff --git a/src/main/java/com/alipay/remoting/rpc/RpcInvokeCallbackListener.java b/src/main/java/com/alipay/remoting/rpc/RpcInvokeCallbackListener.java index fb84fab7..4c862554 100644 --- a/src/main/java/com/alipay/remoting/rpc/RpcInvokeCallbackListener.java +++ b/src/main/java/com/alipay/remoting/rpc/RpcInvokeCallbackListener.java @@ -127,9 +127,9 @@ public void run() { Thread.currentThread().setContextClassLoader(future.getAppClassLoader()); } + response.setInvokeContext(future.getInvokeContext()); Object responseObj = RpcResponseResolver.resolveResponseObject(response, this.remoteAddress); - response.setInvokeContext(future.getInvokeContext()); try { callback.onResponse(responseObj); } catch (Throwable e) {