Permalink
Browse files

Failed connects need to decrement connection pool count. Otherwise, t…

…he pool will think a connection is permanently being used.
  • Loading branch information...
1 parent 9660be5 commit a29426df5cd7ffdb2c54e7b5f225812bdb22ea63 @adamhathcock adamhathcock committed Aug 15, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 vertx-core/src/main/java/org/vertx/java/core/http/impl/DefaultHttpClient.java
@@ -436,6 +436,11 @@ public void handle() {
}
private void failed(NioSocketChannel ch, final Throwable t) {
+ tcpHelper.runOnCorrectThread(ch, new Runnable() {
+ public void run() {
+ pool.connectionClosed();
+ }
+ });
if (t instanceof Exception && exceptionHandler != null) {
tcpHelper.runOnCorrectThread(ch, new Runnable() {
public void run() {

0 comments on commit a29426d

Please sign in to comment.