jdk/src/share/classes/sun/nio/ch/ServerSocketAdaptor.java
changeset 22604 9b394795e216
parent 18212 22f8c33b0690
child 23010 6dadb192ad81
equal deleted inserted replaced
22603:816588059f9d 22604:9b394795e216
   111                     long to = timeout;
   111                     long to = timeout;
   112                     for (;;) {
   112                     for (;;) {
   113                         if (!ssc.isOpen())
   113                         if (!ssc.isOpen())
   114                             throw new ClosedChannelException();
   114                             throw new ClosedChannelException();
   115                         long st = System.currentTimeMillis();
   115                         long st = System.currentTimeMillis();
   116                         int result = ssc.poll(PollArrayWrapper.POLLIN, to);
   116                         int result = ssc.poll(Net.POLLIN, to);
   117                         if (result > 0 && ((sc = ssc.accept()) != null))
   117                         if (result > 0 && ((sc = ssc.accept()) != null))
   118                             return sc.socket();
   118                             return sc.socket();
   119                         to -= System.currentTimeMillis() - st;
   119                         to -= System.currentTimeMillis() - st;
   120                         if (to <= 0)
   120                         if (to <= 0)
   121                             throw new SocketTimeoutException();
   121                             throw new SocketTimeoutException();