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

Fix a crash issue that happened when #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Oceankenny
Copy link

@Oceankenny Oceankenny commented Nov 3, 2016

When sio_client is destructed:

  1. sio_socket was removed within sio_socket::impl::on_close and destructed.
  2. WaitHandler of m_connection_timer(sio_socket::impl::on_close) is triggered although the timer
  3. crash when trying to access members of sio_socket::impl since it has been destructed.

1. sio_socket was removed within socket::impl::on_close and destructed.
2. WaitHandler of m_connection_timer(sio_socket::impl::on_close) is
triggered although the timer
3. crash when trying to access members of sio_socket::impl since it has
been destructed.
@melode11
Copy link
Contributor

I think you need to handle exist sio::socket lifecycle in socket client callbacks. Simply ignore the clean up when timeout happen will cause the resource leaks.

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.

2 participants