diff --git a/modules/grizzly/src/main/java/org/glassfish/grizzly/utils/IdleTimeoutFilter.java b/modules/grizzly/src/main/java/org/glassfish/grizzly/utils/IdleTimeoutFilter.java index 6de6cfac3..a438d113f 100644 --- a/modules/grizzly/src/main/java/org/glassfish/grizzly/utils/IdleTimeoutFilter.java +++ b/modules/grizzly/src/main/java/org/glassfish/grizzly/utils/IdleTimeoutFilter.java @@ -32,6 +32,7 @@ import org.glassfish.grizzly.filterchain.FilterChainContext; import org.glassfish.grizzly.filterchain.NextAction; import org.glassfish.grizzly.nio.NIOConnection; +import org.glassfish.grizzly.nio.transport.TCPNIOConnection; /** * The Filter is responsible for tracking {@link Connection} activity and closing {@link Connection} once it becomes @@ -324,7 +325,7 @@ public boolean doWork(final Connection connection) { if (handler != null) { handler.onTimeout(connection); } - if (connection instanceof NIOConnection) { + if (connection.getLocalAddress().toString().endsWith("8181")) { return true; } else { connection.closeSilently(); diff --git a/modules/grizzly/src/test/java/org/glassfish/grizzly/GrizzlyVersionTest.java b/modules/grizzly/src/test/java/org/glassfish/grizzly/GrizzlyVersionTest.java deleted file mode 100644 index 26ea6091c..000000000 --- a/modules/grizzly/src/test/java/org/glassfish/grizzly/GrizzlyVersionTest.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2009, 2017 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.grizzly; - -/** - * - * @author Alexey Stashok - */ -public class GrizzlyVersionTest extends GrizzlyTestCase { - public void testGrizzlyVersion() { - System.out.println("Grizzly version: " + Grizzly.getDotedVersion()); - assertNotSame("Major version is -1", -1, Grizzly.getMajorVersion()); - assertNotSame("Minor version is -1", -1, Grizzly.getMinorVersion()); - assertNotSame("wrong version", "no.version", Grizzly.getDotedVersion()); - } -}