-
Notifications
You must be signed in to change notification settings - Fork 822
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
stream/match: allow a single connection to maintain its own match lookup for multi-connection #1613
base: master
Are you sure you want to change the base?
Conversation
…larity on purpose. Change connections map to point to candidate to track subscriptions for future dynamic connections holder and drop struct ConnectionDetails.
…rror but websocket frame error or anything really makes the reader routine return and then connection never cycles and the buffer gets filled. * Handle reconnection via an errors.Is check which is simpler and in that scope allow for quick disconnect reconnect without waiting for connection cycle. * Dial now uses code from DialContext but just calls context.Background() * Don't allow reader to return on parse binary response error. Just output error and return a non nil response
…would hang connection reader for eternity.
…ove code that is not needed.
…le to echo back ws data as it can be easily reviewed _test file side.
…ad of waiting for a time period, add sleep inline with echo handler as this is really quick and wanted to ensure that latency is handing correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding this. I would just like to see a test from gateio_test.go along similar lines to this: #1601 (comment)
which would allow for your changes to be hit
If you want that I will just wait until #1598 is merged it has all the auth and outbound inbound testing done there. |
PR Description
Attempts to decouple a connection from a global lookup table for outbound request to response matching. This allows for generic startup messages to be used across future multiple connections of the same type. This also minimises the chance of a signature conflict on outbound requests. Potentially reduces the semacquire slowness when dealing with many concurrently spawned and subscribed return responses.
This is backwards compatible.
Starts implementation in Gateio due to websocket/gateio: Support multi connection management and integrate with GateIO #1580 base.
Requires #1580 #1581 #1598 (tests)
Type of change
Please delete options that are not relevant and add an
x
in[]
as item is complete.How has this been tested
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration and
also consider improving test coverage whilst working on a certain feature or package.
Checklist