lgoldstein commented on a change in pull request #115: Add timeout with
Duration and apply larger timeouts to tests that oft…
URL: https://github.com/apache/mina-sshd/pull/115#discussion_r385159402
##########
File path:
sshd-common/src/main/java/org/apache/sshd/common/future/WaitableFuture.java
##########
@@ -65,6 +66,19 @@ default boolean await(long timeout, TimeUnit unit) throws
IOException {
return await(unit.toMillis(timeout));
}
+ /**
+ * Wait for the asynchronous operation to complete with the specified
timeout.
+ *
+ * @param timeout The maximum duration to wait
+ * @return {@code true} if the operation is completed.
+ * @throws IOException if failed - specifically {@link
java.io.InterruptedIOException}
+ * if waiting was interrupted
+ * @see #await(long)
+ */
+ default boolean await(Duration timeout) throws IOException {
+ return await(timeout.toMillis());
Review comment:
In other locations the code interprets `null` as *forever* - let's maintain
this convention (or fix the other code - `ClientChannel#waitFor`) - see similar
previous comment
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]