Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/BufferInputStream.java')
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/BufferInputStream.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/BufferInputStream.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/BufferInputStream.java
index bd994b51c1..3bc488caf3 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/BufferInputStream.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/BufferInputStream.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008-2012, 2015, 2016, 2018-2020 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2008-2012, 2015, 2016, 2018-2020, 2022 Eike Stepper (Loehne, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -347,11 +347,14 @@ public class BufferInputStream extends InputStream implements IBufferHandler
remaining = stopTimeMillis;
}
+ // int forDebuggingOnly;
+ // remaining = Long.MAX_VALUE;
+
remaining -= System.currentTimeMillis();
if (remaining <= 0)
{
// Throw an exception so that caller can distinguish between end-of-stream and a timeout
- throw new IOTimeoutException();
+ throw new IOTimeoutException("Buffer read timeout expired after " + getMillisBeforeTimeout() + " milliseconds");
}
return Math.min(remaining, check);

Back to the top