8000 feat(exchange.close()): have exchange.close() close any pending watch functions with an ExchangeClosedByUser error by pcriadoperez · Pull Request #20609 · ccxt/ccxt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(exchange.close()): have exchange.close() close any pending watch functions with an ExchangeClosedByUser error #20609

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

Merged
merged 14 commits into from
Jan 4, 2024

Conversation

pcriadoperez
Copy link
Contributor
@pcriadoperez pcriadoperez commented Dec 31, 2023
  • Create error ExchangeClosedByUser to be thrown to watch functions that are awaiting a response while an exchange is closed.
  • Typescript: Move where the clients are deleted during closing to avoid new connections being connected during the close process.
  • Create test.close to test exchange.close() behavior

Python

  • onClose wasn't being called, and when hitting feed_eof, on_error was beeing called. Made changes to Fast_client to fix this.

Python: depends on https://github.com/ccxt/ccxt/pull/20563/files

Can test by running test files:
node --loader ts-node/esm ts/src/pro/test/base/test.close.ts
python3 python/ccxt/pro/test/base/test_close.py
php php/pro/test/base/test_close.php

@pcriadoperez pcriadoperez self-assigned this Dec 31, 2023
@pcriadoperez pcriadoperez marked this pull request as ready for review January 1, 2024 22:33
@pcriadoperez pcriadoperez changed the title exchange.close() feat(exchange.close()): have exchange.close() close any pending watch functions with an ExchangeClosedByUser error Jan 1, 2024
@carlosmiei carlosmiei merged commit 225bc94 into ccxt:master Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0