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

Is there a way to have keepalive on when in O_ONE_LOOP mode? #259

Open
ghost opened this issue Sep 29, 2019 · 1 comment
Open

Is there a way to have keepalive on when in O_ONE_LOOP mode? #259

ghost opened this issue Sep 29, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 29, 2019

Hello,

I start onion like this:

onion *o=onion_new(O_ONE_LOOP );

But in this mode it seems to close connection after each request. I would like to keep the connection alive. Is this possible?

thanks!

@ghost
Copy link
Author

ghost commented Sep 29, 2019

Please disregard and close this issue... I figured out I could just set number of threads to 1.

onion_set_max_threads(o, 1);

That seems to work fine.

Strangely, the simple test I do of 1000 requests takes 29 seconds in O_ONE_LOOP mode and 50 seconds or more in O_THREADED mode.

Doesn't really matter why though because I really want to run in O_ONE_LOOP mode, so a good outcome.

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

No branches or pull requests

0 participants