From baadf2c812c8d1951817dacb9739ddbe777d9cc3 Mon Sep 17 00:00:00 2001 From: Manish Kumar Date: Tue, 16 Jun 2015 15:24:34 -0400 Subject: [PATCH] Trying to fix - https://github.com/vert-x/mod-rxvertx/issues/39 --- src/main/java/io/vertx/rxcore/java/http/RxHttpClient.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/io/vertx/rxcore/java/http/RxHttpClient.java b/src/main/java/io/vertx/rxcore/java/http/RxHttpClient.java index c274173..b62072e 100644 --- a/src/main/java/io/vertx/rxcore/java/http/RxHttpClient.java +++ b/src/main/java/io/vertx/rxcore/java/http/RxHttpClient.java @@ -109,6 +109,13 @@ public void handle(HttpClientResponse r) { }; HttpClientRequest req=core.request(method,uri,rh); + // if connection negotion fails - exception handler on http-client. SSL Exception aren't caught on httpRequest, but on httpClient. + this.core.exceptionHandler(new Handler() { + @Override + public void handle(Throwable event) { + rh.fail(event); + } + }); // if req fails, notify observers req.exceptionHandler(new Handler() { @Override