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

Sudden shutdowns when TLS connection is ended #155

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

lcsmuller
Copy link
Collaborator

Notice

  • I understand the code that I have edited, and have the means
    to test it before making changes to Concord.

What?

  • Segfaults when TLS connection is ended
  • Indefinitely looping by relying only on libcurl's is_running flag, should check WS Client status aswell.

Why?

Show-stopper bugs that would make the application crash and not be able to reconnect

How?

Change WS Client's status to disconnected once the TLS connection is ended. In this case, the connection has been completely severed and the client shouldn't attempt to send more payloads to Discord's.

Testing?

WIP

@lcsmuller lcsmuller added the bug Something isn't working label Aug 5, 2023
@lcsmuller lcsmuller self-assigned this Aug 5, 2023
@lcsmuller lcsmuller force-pushed the fix/unexpected-shutdowns branch 3 times, most recently from c152a3a to 96ca44f Compare August 5, 2023 17:05
- Fix by changing status to `WS_DISCONNECTED` when TLS connection is
ended, then avoid sending a request at `discord_gateway_perform()`
by checking on the current websockets status
@lcsmuller lcsmuller merged commit ee5cd73 into dev Jan 10, 2024
2 checks passed
@lcsmuller lcsmuller deleted the fix/unexpected-shutdowns branch January 10, 2024 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant