-
Notifications
You must be signed in to change notification settings - Fork 339
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
self._call_lock never released when trying to send payload on a closed socket #46
Labels
bug
Something isn't working
Comments
Good catch! Thanks for reporting it |
OrangeTux
pushed a commit
that referenced
this issue
Nov 15, 2019
ocpp.ChargePoint.call() implements flow control as defined in the OCPP specification. It makes sure that no call can be send after an answer on the previous request has been received. A lock is used to implement flow control. If the call `await self._send(call.json())` crashed it the lock wouldn't be released which could lead to a deadlock. Fixes: #46
Merged
proelke
pushed a commit
that referenced
this issue
Nov 18, 2019
ocpp.ChargePoint.call() implements flow control as defined in the OCPP specification. It makes sure that no call can be send after an answer on the previous request has been received. A lock is used to implement flow control. If the call `await self._send(call.json())` crashed it the lock wouldn't be released which could lead to a deadlock. Fixes: #46
OrangeTux
pushed a commit
that referenced
this issue
Nov 18, 2019
The fix introduced for #46 contained a bug. `ChargePoint.call()` could fail with: try: await self._send(call.to_json()) response = \ await self._get_specific_response(call.unique_id, self._response_timeout) finally: self._call_lock.release() > raise E RuntimeError: No active exception to reraise
OrangeTux
pushed a commit
that referenced
this issue
Nov 18, 2019
The fix introduced for #46 contained a bug. `ChargePoint.call()` could fail with: try: await self._send(call.to_json()) response = \ await self._get_specific_response(call.unique_id, self._response_timeout) finally: self._call_lock.release() > raise E RuntimeError: No active exception to reraise Fixes: #50
OrangeTux
added a commit
that referenced
this issue
Nov 18, 2019
The fix introduced for #46 contained a bug. `ChargePoint.call()` could fail with: try: await self._send(call.to_json()) response = \ await self._get_specific_response(call.unique_id, self._response_timeout) finally: self._call_lock.release() > raise E RuntimeError: No active exception to reraise Fixes: #50
ajmirsky
pushed a commit
to ajmirsky/ocpp
that referenced
this issue
Nov 26, 2024
ocpp.ChargePoint.call() implements flow control as defined in the OCPP specification. It makes sure that no call can be send after an answer on the previous request has been received. A lock is used to implement flow control. If the call `await self._send(call.json())` crashed it the lock wouldn't be released which could lead to a deadlock. Fixes: mobilityhouse#46
ajmirsky
pushed a commit
to ajmirsky/ocpp
that referenced
this issue
Nov 26, 2024
The fix introduced for mobilityhouse#46 contained a bug. `ChargePoint.call()` could fail with: try: await self._send(call.to_json()) response = \ await self._get_specific_response(call.unique_id, self._response_timeout) finally: self._call_lock.release() > raise E RuntimeError: No active exception to reraise Fixes: mobilityhouse#50
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ocpp/ocpp/charge_point.py
Line 251 in 75dd91f
If you try and send a payload, but the socket connection is terminated by the server just before trying to send, a
websockets.exceptions.ConnectionClosedError
is raised but never caught here. This leads toself._call_lock.release()
never being called, making it impossible to send data again.The text was updated successfully, but these errors were encountered: