From owner-freebsd-java Tue Dec 5 15:45:40 2000 From owner-freebsd-java@FreeBSD.ORG Tue Dec 5 15:45:36 2000 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from hotmail.com (oe20.law9.hotmail.com [64.4.8.124]) by hub.freebsd.org (Postfix) with ESMTP id B16C237B400 for ; Tue, 5 Dec 2000 15:45:36 -0800 (PST) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 5 Dec 2000 15:45:36 -0800 X-Originating-IP: [63.197.90.253] Reply-To: "Ajay Jagannath" From: "Ajay Jagannath" To: Subject: Java Pgm Hangs Date: Tue, 5 Dec 2000 15:45:33 -0800 Organization: Alcatel Internetworking MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00F2_01C05ED2.673EB5C0" X-Priority: 1 X-MSMail-Priority: High X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: X-OriginalArrivalTime: 05 Dec 2000 23:45:36.0642 (UTC) FILETIME=[77464620:01C05F15] Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This is a multi-part message in MIME format. ------=_NextPart_000_00F2_01C05ED2.673EB5C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi=20 import java.net.*; public class TestSocket extends Thread { private ServerSocket s1 =3D null; private ServerSocket s2 =3D null; =20 public TestSocket() throws Exception { s1 =3D new ServerSocket(20000); s1.setSoTimeout(500); =20 s2 =3D new ServerSocket(21000); s2.setSoTimeout(500); }=20 =20 public static void main(String args[]) throws Exception { TestSocket ts =3D new TestSocket(); ts.start(); } =20 public void run() { for(;;) { Socket in; try { System.out.println("s1 timeout "+s1.getSoTimeout()); in =3D s1.accept(); } catch(Exception e) { System.out.println(e.getMessage()); } try { System.out.println("s2 timeout "+s2.getSoTimeout()); in =3D s2.accept(); } catch(Exception e1) { System.out.println(e1.getMessage()); } } } } When I set the system date back by 3 or minutes using the date command = than the above java program hanges. Is there a workaround or a bug fix for this=20 Version: FreeBSD 3.4 Jdk 1.1.7 Thanks Ajay Jagannath ------=_NextPart_000_00F2_01C05ED2.673EB5C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi
 
import java.net.*;
 
public class TestSocket extends=20 Thread
{
 private ServerSocket s1 =3D null;
 private=20 ServerSocket s2 =3D null;
 
 public TestSocket() throws=20 Exception
 {
  s1 =3D new=20 ServerSocket(20000);
  s1.setSoTimeout(500);
  =
  s2=20 =3D new=20 ServerSocket(21000);
  s2.setSoTimeout(500);
 } = ;
  
 public=20 static void main(String args[]) throws=20 Exception
 {
  TestSocket ts =3D new=20 TestSocket();
  ts.start();
 }
 
 pu= blic=20 void=20 run()
 {
  for(;;)
  {
  &= nbsp;Socket=20 in;
   try
   {
   =  System.out.println("s1=20 timeout "+s1.getSoTimeout());
    in =3D=20 s1.accept();
   }
   catch(Exception = e)
   {
    System.out.println(e= .getMessage());
   }
   try
 =   {
    System.out.println("s2=20 timeout "+s2.getSoTimeout());
    in =3D=20 s2.accept();
   }
   catch(Exception = e1)
   {
    System.out.println(= e1.getMessage());
   }
  }
 }
}=
 
When I set the system date back by = 3 or=20 minutes using the date command than the above java program = hanges.
Is there a workaround or a bug fix for = this=20
 
Version: FreeBSD 3.4
Jdk 1.1.7
 
Thanks
 
Ajay Jagannath

------=_NextPart_000_00F2_01C05ED2.673EB5C0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message