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
Unable to transfer a subscription from one client to another #4618
Comments
What is the returned status code? |
Status code returned by the server is 0. If I search through the source code for 'TransferSubscriptionRequest' and 'TransferSubscriptionsResponse' they only exist in the build\src_generated and src\server folders. Nothing on the client side does anything at all with the request or the response - I assume it should be keeping track of which subscription ids were sent in the request, and if the response comes back ok, adding those the list of subscriptions for the client so that publish requests will be sent out. Although there doesn't seem to be enough information in the transfer request or response to create a new UA_Subscription object from scratch, so I'm not sure how that is supposed to work. Here is the full output with UA_LOGLEVEL set to 0 showing nothing happening after the transfer response.
|
Description
Unable to transfer a subscription from one client to another
Background Information / Reproduction Steps
Create a client connection to server, set up a subscription, create another connection, transfer the subscription over. Server returns success but never publishes any messages after the transfer is completed. This seems to be because the library doesn't pick up on the fact that the subscription has been transferred, and as such the subscriptions list for the second client is empty, so when UA_Client_subscriptions_backgroundPublish is called, it returns straight away.
Sample code that reproduces the issue is below. This was copied from the 'Client_subscription_transfer' method from the test suite and modified to remove the asserts and put in a couple more iterates in order to check that the original subscription was working. Note that the Client_subscription_transfer test function as it is currently written doesn't actually test anything to do with the transfer - it is simply checking to see if multiple connections can be made to the server, so that test will always pass.
Sample code
Used CMake options:
Checklist
Please provide the following information:
UA_LOGLEVEL
set as low as necessary) attachedThe text was updated successfully, but these errors were encountered: