Fix potential race condition in rpc adapter.

This commit is contained in:
Florian Nücke
2020-12-14 14:10:59 +01:00
parent b7eb00b5a7
commit 10be548ee9

View File

@@ -147,8 +147,12 @@ public final class RPCAdapter implements Steppable {
if (synchronizedInvocation != null) {
final MethodInvocation methodInvocation = synchronizedInvocation;
synchronizedInvocation = null;
processMethodInvocation(methodInvocation, true);
// This is also used to prevent thread from processing messages, so only
// reset this when we're done. Otherwise we may get a race-condition when
// writing back data.
synchronizedInvocation = null;
}
}