Use targetTransport.threadPool to stash context not the local one

This commit is contained in:
Simon Willnauer 2016-01-28 09:53:35 +01:00
parent 2a137b5548
commit 2ca3433bea

View File

@ -225,7 +225,7 @@ public class LocalTransport extends AbstractLifecycleComponent<Transport> implem
transportServiceAdapter.sent(data.length);
transportServiceAdapter.onRequestSent(node, requestId, action, request, options);
targetTransport.workers().execute(() -> {
ThreadContext threadContext = threadPool.getThreadContext();
ThreadContext threadContext = targetTransport.threadPool.getThreadContext();
try (ThreadContext.StoredContext context = threadContext.stashContext()) {
targetTransport.messageReceived(data, action, LocalTransport.this, version, requestId);
}