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 connection goes silent #17

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

mussonero
Copy link
Contributor

@mussonero mussonero commented Oct 11, 2020

This is a draft for schedule connection retry otherwise quit.
Still need to be optimized

@mussonero mussonero force-pushed the master branch 8 times, most recently from 3eb939a to 3e88a86 Compare October 11, 2020 20:21
@dmikushin
Copy link
Owner

Thanks for working on this! Anything I can help with?

@mussonero
Copy link
Contributor Author

Thanks for working on this! Anything I can help with?

You are welcome :), this issue was bothering me for a long time.
At the moment I am testing one connection with a multiply streams "like more than 20 endpoints" inside one loop, it seems to work fine if the "connection attempts exhausted" or if there is an error.
Before it was not possible, even if you unplug the network cable it will not quit LOOOL.

Please take a look, if there is something to be optimized.

Kind regards
MussoNero

@mussonero
Copy link
Contributor Author

@dmikushin there are additional fixes that need to be added, I will update the PR once I finish working on it from my side.

@mussonero mussonero force-pushed the master branch 3 times, most recently from eb706ae to 0b00db1 Compare October 13, 2020 20:06
@mussonero
Copy link
Contributor Author

@dmikushin
For the moment the patch I provided seems to work fine, please let me know if I am missing something.
here is a screenshot from my auto-bots using 45 streams where it can detect the websocket session ended or it went silents
image

@mussonero mussonero force-pushed the master branch 2 times, most recently from a41a048 to b225358 Compare October 14, 2020 18:48
mussonero and others added 3 commits October 14, 2020 20:48
schedule connection retry if it fail, it will quit
added additional notes and fixed "IF ELSE" statement +  missing header
Segmentation fault can happen when we attempting to emit signals from within the static method.

In other words, from the callback, we need to invoke some non-static method of WebSocket which would emit the needed signal
@mussonero mussonero force-pushed the master branch 5 times, most recently from 9c74b2b to 86f81fe Compare October 16, 2020 08:10
Note: a single connection can listen to a maximum of 1024 streams
mussonero and others added 2 commits October 18, 2020 10:28
fix missing  pthread_mutex_init & pthread_mutex_destroy.
remove unused lws_extesion & more  mutex luck to event-callback
@mussonero mussonero force-pushed the master branch 2 times, most recently from dfc9d36 to 00130a4 Compare October 18, 2020 22:04
@dmikushin
Copy link
Owner

@mussonero Nice progress, should I push this into master?

@dmikushin
Copy link
Owner

Hi @mussonero , I would like to clean up your v2 version and release it under 2.0 tag in this repository. Please let me know, if you disagree.

@mussonero
Copy link
Contributor Author

Hi, yes sure no problem

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