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

Running into connect issue on docker for windows #6

Open
martinscheffler opened this issue Sep 29, 2021 · 1 comment
Open

Running into connect issue on docker for windows #6

martinscheffler opened this issue Sep 29, 2021 · 1 comment

Comments

@martinscheffler
Copy link

Situation:
I run an mqtt broker inside a docker container on windows. Everything works fine except this situation:

  • mqtt broker is down
  • aio-mqtt connect() is awaiting aio.open_connection() for a few seconds
  • mqtt broker comes up, aio.open_connection returns successful
  • Client::read() now throws an IncompleteReadError. I think this is something special to Docker on Windows because of weird socket forwarding or something.
  • Client::_task_done_callback now calls Client::_disconnect which is OK.
  • Client::_disconnect checks variable self._connected. Because Client::connect() is not completed yet, this evaluates to false and does not execute.
  • Result is a _read loop that has stopped.

Possible solution:

In Client::connect, move the line that does

self._connected = True
up so that it is done before the _reading_task and the other tasks are started.

@skewty
Copy link

skewty commented Dec 7, 2022

I have the same issue on Fedora Linux. I believe it is a calculation algorithm issue in one of the read methods / functions.

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