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

SocketReactor: Remove not useful handlers calls #3701

Closed
aleks-f opened this issue Jul 20, 2022 · 7 comments
Closed

SocketReactor: Remove not useful handlers calls #3701

aleks-f opened this issue Jul 20, 2022 · 7 comments
Assignees

Comments

@aleks-f
Copy link
Member

aleks-f commented Jul 20, 2022

There are handler calls in the SocketReactor::run() that are of no use (onIdle()), or little use (onBusy()).

These calls will be removed from SocketReactor::run(). Subscribers to these events will have to overide the run() function to keep the functionality.

@aleks-f aleks-f added enhancement breaking A breaking change labels Jul 20, 2022
@aleks-f aleks-f added this to the Release 1.13.0 milestone Jul 20, 2022
@aleks-f aleks-f self-assigned this Jul 20, 2022
@aleks-f aleks-f added the fixed label Jul 31, 2022
@micheleselea
Copy link
Contributor

onIdle and onBusy handlers, can be usefull to handle a dead socket, for example a socket that do not send you nothing for X seconds. That was the main reason I use it now

@zosrothko
Copy link
Member

Agreed with @micheleselea . One need a way to smoothly cleanup the socket space otherwise, one could get an exhaust exception

@aleks-f
Copy link
Member Author

aleks-f commented Aug 23, 2022

I'm not following, onIdle() was called when there are no socket handlers - who's there to handle the idle notification?

When there are registered handlers but no activity, there is timeout notification:

/// If the poll timeout expires and no event has occurred, a
/// TimeoutNotification will be dispatched to all event handlers
/// registered for it. This is done in the onTimeout() method
/// which can be overridden by subclasses to perform custom
/// timeout processing.

@aleks-f
Copy link
Member Author

aleks-f commented Aug 23, 2022

In any case, SocketReactor is a Runnable, which means user can override the run() to do whatever necessary for their requirements - we can't be all things to all people.

@micheleselea
Copy link
Contributor

yes @aleks-f you are right, it's onBusy that do the "socket checker" in my project and I already had to extend the SocketReacor

@github-actions
Copy link

This issue is stale because it has been open for 365 days with no activity.

@github-actions github-actions bot added the stale label Aug 24, 2023
@github-actions
Copy link

This issue was closed because it has been inactive for 60 days since being marked as stale.

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

3 participants