Skip to content

Commit

Permalink
Fixes #7514 - Adding InheritedListeners to already-started components…
Browse files Browse the repository at this point in the history
… can cause IllegalStateException

Removed the unnecessary check-and-throw statements from SelectorManager.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
  • Loading branch information
sbordet committed Feb 2, 2022
1 parent a8a6020 commit 8b16a0a
Showing 1 changed file with 0 additions and 4 deletions.
Expand Up @@ -396,8 +396,6 @@ protected void connectionFailed(SelectableChannel channel, Throwable ex, Object
@Override
public boolean addEventListener(EventListener listener)
{
if (isRunning())
throw new IllegalStateException(this.toString());
if (super.addEventListener(listener))
{
if (listener instanceof AcceptListener)
Expand All @@ -410,8 +408,6 @@ public boolean addEventListener(EventListener listener)
@Override
public boolean removeEventListener(EventListener listener)
{
if (isRunning())
throw new IllegalStateException(this.toString());
if (super.removeEventListener(listener))
{
if (listener instanceof AcceptListener)
Expand Down

0 comments on commit 8b16a0a

Please sign in to comment.