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

add remove methode for listener #845

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

Conversation

ulyssedu45
Copy link

Addition of a remove method for listeners

@ulyssedu45
Copy link
Author

Add close methode for client

Copy link
Contributor

@liangyuanpeng liangyuanpeng left a 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>
Copy link
Contributor

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){
Copy link
Contributor

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
Copy link
Contributor

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 ?

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.

None yet

2 participants