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

Multiple shutdown endless loop #37

Open
NINI1988 opened this issue Jan 29, 2025 · 0 comments
Open

Multiple shutdown endless loop #37

NINI1988 opened this issue Jan 29, 2025 · 0 comments

Comments

@NINI1988
Copy link

When shutting down the remote can multiple times, an endless loop occur.

In python-can/bus.py#L482 double shutdown is handled by just returning.
But in in this project, the first time everything is handled correctly and an WebsocketClosed exception is thrown and handled correctly.
But the second time, the recv in protocol.py#L33 with raise a ValueError("An error occurred: file descriptor cannot be a negative integer (-1)"), which will be caught by the surrounding catch and will never get out to be caught as WebsocketClosed.

import can

can1: can.BusABC = can.Bus(f"ws://ip:54701/", interface="remote")

can1.shutdown()
can1.shutdown()
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

1 participant