Skip to content
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

api.call() doesn't return #290

Open
richastral opened this issue Sep 1, 2023 · 1 comment
Open

api.call() doesn't return #290

richastral opened this issue Sep 1, 2023 · 1 comment

Comments

@richastral
Copy link

Describe the bug
When using api.call() for example:

async function main() { const res = await TelegramAPI.call('help.getNearestDc', {}); console.log(res); } main();

The function does not close e.g. return to prompt. It seems like the socket is still open so that app does not finish:

node .\dc.js { _: 'nearestDc', country: 'AU', this_dc: 5, nearest_dc: 5 } // Hangs here and does not go to prompt.
Expected behavior
I would expect for the function to finish and the app close. Reason for the question is that I will be calling this from an API, so would want it to close.

Screenshots
image

Context:

  • "@mtproto/core": "6.3.0"
  • Node version: Node.js v18.16.0

Any help on this would be appreciated.

@Raptor5
Copy link

Raptor5 commented Oct 4, 2023

Same problem

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

No branches or pull requests

2 participants