exception added for close TCP connection #121
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After disconnection of cable between EV and EVSE physically, it could not stop the connection and threw an Exception. This causes us to not clear active sessions from comm_session list.
The exception below:
INFO 2022-08-31 10:36:53,251 - mqtt_api (219): No handler for 'meter_values' registered. Returning.
DEBUG 2022-08-31 10:36:55,609 - iso15118.secc.comm_session_handler (224): TCP client connected, client address is ('fe80::f27f:cff:fe0a:41a6', 49152, 0, 4).
DEBUG 2022-08-31 10:36:55,611 - iso15118.shared.comm_session (272): Trying to resume communication session
INFO 2022-08-31 10:36:55,615 - iso15118.shared.states (137): Entered state SupportedAppProtocol
INFO 2022-08-31 10:36:55,620 - iso15118.shared.states (141): Waiting for up to 20.0 s
ERROR 2022-08-31 10:36:55,628 - iso15118.shared.utils (51): [Errno 104] Connection reset by peer
Traceback (most recent call last):
File "iso15118/shared/utils.py", line 49, in wait_for_tasks
File "iso15118/shared/comm_session.py", line 438, in rcv_loop
File "asyncio/tasks.py", line 447, in wait_for
File "asyncio/streams.py", line 650, in read
File "iso15118/shared/utils.py", line 49, in wait_for_tasks
File "iso15118/shared/comm_session.py", line 438, in rcv_loop
File "asyncio/tasks.py", line 447, in wait_for
File "asyncio/streams.py", line 650, in read
File "iso15118/shared/utils.py", line 49, in wait_for_tasks
File "iso15118/shared/comm_session.py", line 485, in rcv_loop
File "iso15118/shared/comm_session.py", line 399, in stop
File "asyncio/streams.py", line 344, in wait_closed
File "asyncio/selector_events.py", line 856, in _read_ready__data_received
ConnectionResetError: [Errno 104] Connection reset by peer