Adding timeout to RPC call when waiting for replies