Skip to content

Please handle InterruptedExceptions correctly #52

@vfelberg

Description

@vfelberg

Class com.rabbitmq.utility.BlockingCell has several while loops catching InterruptedExceptions and ignoring them. This makes it impossible to shutdown the app correctly; you have to kill it brutally. The correct handling of an InterruptedException in a while loop would be:

try {
  ...
} catch (InterruptedException e) {
  Thread.currentThread().interrupt();
  return;
}

There are probably other classes swallowing InterruptedExceptions as well; I'm just reporting the one I found while analyzing what causes our app to hang.

For background info on thread interruption, see e.g.: http://www.ibm.com/developerworks/library/j-jtp05236/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions