gocryptotrader
gocryptotrader copied to clipboard
exchange/stream: toggle stream auto subscribe
PR Description
- Taken from #1252
- ~~In engine/websocketroutine_manager.go this swaps the connect and the receiver around so we can start a receiving service while the subscription routine is running. This reduces a blocking issue [BUG] and stops filling up the channel.~~ Change already merged.
- Fixed some errors not being handled correctly
Fixes # (issue)
Type of change
Please delete options that are not relevant and add an x
in []
as item is complete.
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
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.
- [ ] go test ./... -race
- [ ] golangci-lint run
- [x] Test X
Checklist
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation and regenerated documentation via the documentation tool
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally and on Github Actions with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
Codecov Report
Attention: Patch coverage is 46.66667%
with 16 lines
in your changes are missing coverage. Please review.
Project coverage is 37.93%. Comparing base (
1e95ae9
) to head (3353d6d
).
:exclamation: Current head 3353d6d differs from pull request most recent head c236b25. Consider uploading reports for the commit c236b25 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #1488 +/- ##
==========================================
+ Coverage 37.91% 37.93% +0.01%
==========================================
Files 411 411
Lines 147198 147204 +6
==========================================
+ Hits 55817 55836 +19
+ Misses 83588 83587 -1
+ Partials 7793 7781 -12
Files | Coverage Δ | |
---|---|---|
exchanges/exchange.go | 80.33% <100.00%> (+0.88%) |
:arrow_up: |
internal/testing/exchange/exchange.go | 63.63% <50.00%> (-3.76%) |
:arrow_down: |
engine/websocketroutine_manager.go | 53.76% <0.00%> (+0.36%) |
:arrow_up: |
exchanges/sharedtestvalues/customex.go | 2.23% <0.00%> (ø) |
|
exchanges/stream/websocket.go | 85.74% <80.00%> (-0.32%) |
:arrow_down: |
engine/rpcserver.go | 42.11% <0.00%> (ø) |
Makes sense, but is there a particular exchange that this was affecting so that I may attempt to replicate your issue?
Makes sense, but is there a particular exchange that this was affecting so that I may attempt to replicate your issue?
.\gocryptotrader --enableallpairs [WARN] | WEBSOCKET | 01/03/2024 09:44:06 | Kucoin exchange backlog in websocket processing detected
For Kucoin and others with lots of subs.
Changes will be irrelevant to multi connection update #1580.