Akka: clean up state on exception (#2782)

This commit is contained in:
Lauri Tulmin 2021-04-13 02:03:05 +03:00 committed by GitHub
parent 718a5a17a3
commit c5701bcdd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -50,5 +50,10 @@ public class AkkaDispatcherInstrumentation implements TypeInstrumentation {
}
return null;
}
@Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class)
public static void exitDispatch(@Advice.Enter State state, @Advice.Thrown Throwable throwable) {
ExecutorInstrumentationUtils.cleanUpOnMethodExit(state, throwable);
}
}
}