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

SinglePortUdpHarvester should close / unbind when appropriate. #139

Closed
guusdk opened this issue May 16, 2018 · 1 comment
Closed

SinglePortUdpHarvester should close / unbind when appropriate. #139

guusdk opened this issue May 16, 2018 · 1 comment

Comments

@guusdk
Copy link
Contributor

guusdk commented May 16, 2018

I'm running ice4j (as part of the Jitsi Videobridge) in a plugin-based environment. This means that users can start and stop ice4j, without (re)starting the JVM.

Upon usage of our component after it was restarted, we end up with these messages in our log file:

org.ice4j.ice.harvest.SinglePortUdpHarvester - Failed to create SinglePortUdpHarvester for address 198.51.100.1:10000/udp: java.net.BindException: Address already in use (Bind failed)

It appears that this harvester does not properly release all resources, when it's stopped.

guusdk added a commit to guusdk/ice4j that referenced this issue May 16, 2018
A new 'close' method has been added to AbstractUdpListener that is modeled after the 'close' implementation
of AbstractTcpListener.

This change can be used to prevent the issue described in jitsi#139
guusdk added a commit to guusdk/ice4j that referenced this issue May 16, 2018
A new 'close' method has been added to AbstractUdpListener that is modeled after the 'close' implementation
of AbstractTcpListener.

This change can be used to prevent the issue described in jitsi#139
guusdk added a commit to guusdk/ice4j that referenced this issue May 16, 2018
A new 'close' method has been added to AbstractUdpListener that is modeled after the 'close' implementation
of AbstractTcpListener.

This change can be used to prevent the issue described in jitsi#139
bgrozev pushed a commit that referenced this issue May 16, 2018
* AbstractUdpListener should be able to release its resources

A new 'close' method has been added to AbstractUdpListener that is modeled after the 'close' implementation
of AbstractTcpListener.

This change can be used to prevent the issue described in #139

* Prevent concurrent modification of collection.

Part of the processing is removal from the collection that is being iterated over. To
avoid concurrent modification exceptions, a copy of the collection is made, prior to
iteration.

* Style fixes and added copyright notice.
@guusdk
Copy link
Contributor Author

guusdk commented May 17, 2018

Fixed by #140.

@guusdk guusdk closed this as completed May 17, 2018
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

1 participant