Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/AsyncContinuation.java @ 926:88b20b775fa2
remove AsyncContinuation.scheduleTimeout()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 09 Oct 2016 18:31:53 -0600 |
parents | 720a98fb0253 |
children | 1c1c350fbe4b |
comparison
equal
deleted
inserted
replaced
925:720a98fb0253 | 926:88b20b775fa2 |
---|---|
467 { | 467 { |
468 synchronized (this) | 468 synchronized (this) |
469 { | 469 { |
470 cancelTimeout(); | 470 cancelTimeout(); |
471 _continuationListeners=null; | 471 _continuationListeners=null; |
472 } | |
473 } | |
474 | |
475 /* ------------------------------------------------------------ */ | |
476 protected void scheduleTimeout() | |
477 { | |
478 EndPoint endp=_connection.getEndPoint(); | |
479 if (_timeoutMs>0) | |
480 { | |
481 if (endp.isBlocking()) | |
482 { | |
483 synchronized(this) | |
484 { | |
485 _expireAt = System.currentTimeMillis()+_timeoutMs; | |
486 long wait=_timeoutMs; | |
487 while (_expireAt>0 && wait>0 && _connection.getServer().isRunning()) | |
488 { | |
489 try | |
490 { | |
491 this.wait(wait); | |
492 } | |
493 catch (InterruptedException e) | |
494 { | |
495 LOG.trace("",e); | |
496 } | |
497 wait=_expireAt-System.currentTimeMillis(); | |
498 } | |
499 | |
500 if (_expireAt>0 && wait<=0 && _connection.getServer().isRunning()) | |
501 { | |
502 expired(); | |
503 } | |
504 } | |
505 } | |
506 else | |
507 { | |
508 ((AsyncEndPoint)endp).scheduleTimeout(_event._timeout,_timeoutMs); | |
509 } | |
510 } | 472 } |
511 } | 473 } |
512 | 474 |
513 /* ------------------------------------------------------------ */ | 475 /* ------------------------------------------------------------ */ |
514 protected void cancelTimeout() | 476 protected void cancelTimeout() |