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

Fix deadlock on close() with congested server. #46

Merged
merged 1 commit into from Apr 23, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/com/rabbitmq/client/impl/ChannelN.java
Expand Up @@ -571,7 +571,9 @@ public AMQCommand transformReply(AMQCommand command) {
// we wait for the reply. We ignore the result.
// (It's NOT always close-ok.)
notify = true;
k.getReply(-1);
// Should not wait indefinately, since if the server is congested
// the call will lock and never return. This stalls and kills the current thread.
k.getReply(10000);
} catch (TimeoutException ise) {
// Will never happen since we wait infinitely
} catch (ShutdownSignalException sse) {
Expand Down