Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use current instance method for RPC calls #349

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

tom-binary
Copy link
Contributor

Previously, this would take a snapshot of all the RPC method coderefs, and use those when handling any incoming RPC calls.

The downside of this approach is that it leads to surprising behaviour if you try to override the RPC method with something else later, for example in a method attribute.

We don't really gain anything by doing this - Perl already caches method calls. This commit therefore changes the behaviour to a standard method call keyed by the method name, meaning each RPC call will use whichever method is in the package symbol table.

Previously, this would take a snapshot of all the RPC method coderefs,
and use those when handling any incoming RPC calls.

The downside of this approach is that it leads to surprising behaviour
if you try to override the RPC method with something else later, for
example in a method attribute.

We don't really gain anything by doing this - Perl already caches
method calls. This commit therefore changes the behaviour to a standard
method call keyed by the method name, meaning each RPC call will use
whichever method is in the package symbol table.
@tom-binary tom-binary merged commit d2f29f0 into deriv-com:master Oct 15, 2024
1 check passed
@tom-binary tom-binary deleted the feature/rpc_dynamic_method branch October 15, 2024 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant