From dc7ecdbed37a51f5bc9daf6e29371ef3d14fc300 Mon Sep 17 00:00:00 2001 From: membar Date: Thu, 4 Dec 2003 00:31:27 +0000 Subject: * gnu/java/nio/natSelectorImplPosix.cc (implSelect): A timeout of 0 means an infinite timeout. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74259 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/gnu/java/nio/natSelectorImplPosix.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libjava/gnu/java') diff --git a/libjava/gnu/java/nio/natSelectorImplPosix.cc b/libjava/gnu/java/nio/natSelectorImplPosix.cc index 8f1bb685ebf..81de3ed9475 100644 --- a/libjava/gnu/java/nio/natSelectorImplPosix.cc +++ b/libjava/gnu/java/nio/natSelectorImplPosix.cc @@ -57,8 +57,10 @@ gnu::java::nio::SelectorImpl::implSelect (jintArray read, jintArray write, real_time_data.tv_usec = timeout; // If not legal timeout value is given, use NULL. - // This means an infinite timeout. - if (timeout >= 0) + // This means an infinite timeout. The specification + // also says that a zero timeout should be treated + // as infinite. + if (timeout > 0) { time_data = &real_time_data; } -- cgit v1.2.3