Skip to content

Conversation

@duartenfonseca
Copy link
Collaborator

No description provided.

lutzbichler and others added 11 commits July 15, 2025 17:56
Summary
Consistently execute/schedule the action (sending, processing a received message), before trace the message
Details

For send operations: Schedule the message. If successful, trace it.
For receive operations: Process the message, then trace it.
Summary
Would have helped in some other issues to know exactly what connection to
what ECU had a send timeout
Summary
Add logs to registering of subscription handlers
Details
Add logs to when applications register both "normal" and async
subscription handlers for debugging purposes
Summary
Remove the exponential timer increase from connection
Summary
Resolve the issue of the socket not being able to be opened after Resume due to the
"Socket operation on not-socket" error
Details
For some reason, when entering suspend mode, instead of the file descriptor being deleted by the kernel
as happens in normal cases, the file is not being deleted and the socket is only being marked as invalid.
In the case of the "bad file descriptor" error, the socket is shut down and reconnected to establish the new socket.
To resolve the "Socket operation on not-socket" issue, an error handler is implemented in send_cbk with the same
mechanism as "Bad file descriptor" since the error type is similar - instead of the file being deleted when entering
suspend, it couldn't delete the file but marked the socket as invalid. The end goal is the same.
Summary
Ensure to unsubscribe non selective events
Details
This ensures subscription gets removed on SD side,
for the subscribed non selective events.
Summary
Add predicate to condition variables
A call to "wait()" on a "std::condition_variable" should have a condition. cpp:S5404
Summary
Use application name instead of client identifier
Details
This allows to define debounce configurations while using automatic client identifier assignments.
Summary
Set was_not_connected to true if not established or connected
Details
Previously, if a tcp connection was not opened when trying to send
a packet, the send_cbk function would just set the is_sending_ flag
to false, without any mechanism to retransmit the message.
By setting the was_not_connected to true in this situation,
when the connection is established the message will be sent again
in the connect_cbk function.
Summary
Close all connections on "client error".
Details
These changes related to e716737 but here it's the server that loses
connection to the client.
Since the server application may not be consuming services from the
client, the process of re-requesting service availability triggers from
the routing host does not work.
Instead, the server will forcibly terminate all connections to the
client, forcing them to re-establish the connections to the server.
An alternative was considered  where the server would instead
try to reconnect to the client when it tried to send something, but it was
a bigger change that introduced several issues during testing.
Details
This fixes the "3s delays".
What happens goes more or less as follows, for an hypothetical Android
application "AAP"

Android suspends
AAP -> VSIP connection times out, on VSIP
due to missing timeout error handling, nothing happens
Android resumes
AAP reconnects to VSIP, re-establishes AAP -> VSIP, sends
ASSIGN_CLIENT
VSIP still has a record of the "old" connection, so it ignores the
new one, and sends ASSIGN_CLIENT_ACK to the.. old connection
(this causes a send_cbk error, visible in the logs)
AAP times out after 3s, closes connection, goes to step 5
VSIP sees closed connection, cleans connection for client, which
heals the situation for the next AAP attempt

Besides the missing timeout handling, improve logging, and improve a bit
of the client connection registration handling
@duartenfonseca duartenfonseca merged commit 403da30 into master Jul 16, 2025
2 checks passed
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 this pull request may close these issues.

3 participants