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
add remove methode for listener #845
base: master
Are you sure you want to change the base?
Conversation
Add close methode for client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work and add some comment.
@@ -3,7 +3,7 @@ | |||
|
|||
<groupId>com.corundumstudio.socketio</groupId> | |||
<artifactId>netty-socketio</artifactId> | |||
<version>1.7.20-SNAPSHOT</version> | |||
<version>1.7.20</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change is don't need to update.
if(entry.getValue().getListeners().contains(listener)){ | ||
entry.getValue().getListeners().remove(listener); | ||
} | ||
if(entry.getValue().getListeners().size() == 0){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO,Use isEmpty
would be great.
@@ -38,6 +38,12 @@ public interface ClientOperations { | |||
*/ | |||
void disconnect(); | |||
|
|||
/** | |||
* Disconnect client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's different with disconnect()
? it's possible to add this change to disconnect
?
Addition of a remove method for listeners