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

Mongoose on Android stop listening after some time #356

Open
GoogleCodeExporter opened this issue Nov 4, 2015 · 3 comments
Open

Mongoose on Android stop listening after some time #356

GoogleCodeExporter opened this issue Nov 4, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create a service that starts a mongoose server
2. Leave it working
3. After some time it stops responding requests

What is the expected output? What do you see instead?
I expected it to work without interruption

What version of the product are you using? On what operating system?
Trunk

Please provide any additional information below.
It seems that on android the network layer change a bit frequently, wifi goes 
on/off phone radio goes on/off and with those changes the listening sockets get 
invalidated, there is system messages that can be used to be notified but it 
seems that the event loop of mongoose doesn't stop when the mainlistening 
sockets get invalidated and it appears to be working when in reality it isn't.

There is some signals that are ignored on mg_start function.

Maybe we need to attach to another signal to catch when the main sockets get 
invalidated to restart then.

Can someone give any clue with this issue ?


Original issue reported on code.google.com by mingo...@gmail.com on 28 May 2012 at 7:26

@GoogleCodeExporter
Copy link
Author

Continuing with this, how can we check that mongoose listening sockets are 
active ?
Only making a call from outside ?

Original comment by mingo...@gmail.com on 28 May 2012 at 7:44

@GoogleCodeExporter
Copy link
Author

Could you put some debug messages in master_thread() , in select loop to verify 
whether select is returning with error when network disappears?

Original comment by valenok on 31 May 2012 at 9:17

@GoogleCodeExporter
Copy link
Author

The thing is that the main thread never check for error to stop the loop, what 
are you sugesting to test for error and break the loop ?

Original comment by mingo...@gmail.com on 7 Jun 2012 at 12:41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant