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

Using client.close() results in Unhandled Exception: ws not connected #1

Closed
NomadMoto opened this issue Oct 11, 2022 · 1 comment · Fixed by #2
Closed

Using client.close() results in Unhandled Exception: ws not connected #1

NomadMoto opened this issue Oct 11, 2022 · 1 comment · Fixed by #2

Comments

@NomadMoto
Copy link

[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: ws not connected

@NomadMoto
Copy link
Author

NomadMoto commented Oct 11, 2022

Example function:

`void deleteUser() async {
  final client = SurrealDB('ws://localhost:8000/rpc');

  client.connect();
  await client.wait();
  await client.use('ns', 'db');
  await client.signin('root', 'root');

  final delete = await client.query('DELETE user:5');

  print(delete);
  client.close(); <------ line in question causing issue.
}`

@duhanbalci duhanbalci linked a pull request Oct 12, 2022 that will close this issue
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 a pull request may close this issue.

1 participant