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

Remove blocking timeout in libwebsockets connect #891

Closed
wants to merge 5 commits into from

Conversation

Pietfried
Copy link
Contributor

Describe your changes

Potential replace to #889

Issue ticket number and link

Checklist before requesting a review

marcemmers and others added 4 commits November 28, 2024 13:22
…ion for OCPP1.6 ; Removed WEBSOCKET_INIT_DELAY on startup

Signed-off-by: Piet Gömpel <[email protected]>
* Introduced thread_mutex protecting access to threads of libwebsockets when the ~WebsocketLibwebsockets destructor was called it attempted to acquire a lock for the connection_mutex and joins the websocket_thread . But the websocket_thread runs the client_loop that also requires the lock when calling on_conn_fail, so the client_loop which could result in a deadlock

Signed-off-by: Piet Gömpel <[email protected]>
Signed-off-by: Piet Gömpel <[email protected]>
// If we timeouted the on_conn_fail was not dispatched, since it did not had the chance
if (timeouted && local_data->get_state() != EConnectionState::ERROR) {
EVLOG_error << "Conn failed with timeout, without disconnect dispatch, dispatching manually.";
on_conn_fail();
Copy link
Contributor

@maaikez maaikez Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is not called anymore when there is a timeout (because there is no timeout anymore). Isn't that a problem?

Why was the timeout there and can it now be just removed?

@Pietfried
Copy link
Contributor Author

Closed in favor of #896

@Pietfried Pietfried closed this Dec 4, 2024
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