You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2017/08/17 21:28:34 UTC
httpcomponents-core git commit: Add a meaning full exception message
when a timeout occurs.
Repository: httpcomponents-core
Updated Branches:
refs/heads/4.4.x a8ea410cb -> dd21461f7
Add a meaning full exception message when a timeout occurs.
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/dd21461f
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/dd21461f
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/dd21461f
Branch: refs/heads/4.4.x
Commit: dd21461f7dddf75e971c84158e4ca7342ba5bea8
Parents: a8ea410
Author: Gary Gregory <ga...@gmail.com>
Authored: Thu Aug 17 15:28:32 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Thu Aug 17 15:28:32 2017 -0600
----------------------------------------------------------------------
.../main/java/org/apache/http/nio/protocol/HttpAsyncService.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/dd21461f/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java b/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
index 11f02aa..c9a461d 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
@@ -530,7 +530,8 @@ public class HttpAsyncService implements NHttpServerEventHandler {
public void timeout(final NHttpServerConnection conn) throws IOException {
final State state = getState(conn);
if (state != null) {
- exception(conn, new SocketTimeoutException());
+ exception(conn, new SocketTimeoutException(
+ String.format("%,d milliseconds timeout on connection %s", conn.getSocketTimeout(), conn)));
}
if (conn.getStatus() == NHttpConnection.ACTIVE) {
conn.close();