net/rpc: API Call() is not working as expected #29360
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?Windows 10, 64 bit
What did you do?
I am using client.Call(serviceMethod string, args interface{}, reply interface{}) in my code for implementing HTTP RPC client program, where i have passed reference address of variable in both second parameter args(interface type) and third parameter reply(interface type). So that changes made to the receiver's methods in the DefaultServer get reflected outside the client.Call() method.
HTTP RPC client example
HTTP RPC server example
What did you expect to see?
I expected to see the same string values to args and reply(both are interface type) after successfully calling client.Call(). Since i assigned same value at line number 20 as shown in HTTP RPC server example
What did you see instead?
After calling client.Call() args and reply string values are different. I see only reply get modified but not args.
The text was updated successfully, but these errors were encountered: