Changeset 42c5976381076d506e8d4af052b68ee57663cdeb
- Timestamp:
- 04/29/07 10:26:39
(2 years ago)
- Author:
- Christopher Jung <bktheg@web.de>
- git-committer:
- Christopher Jung <bktheg@web.de> 1177835199 +0200
- git-parent:
[b50d1575022f578a3b75ab1678bbb3831fa23c19]
- git-author:
- Christopher Jung <bktheg@web.de> 1177835199 +0200
- Message:
Der Timeout-Thread wird nun auch im Fehlerfall korrekt beendet
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rfb092d4 |
r42c5976 |
|
| 21 | 21 | import net.driftingsouls.ds2.server.framework.Common; |
|---|
| 22 | 22 | import net.driftingsouls.ds2.server.framework.Configuration; |
|---|
| 23 | | import net.driftingsouls.ds2.server.tick.AbstractTickExecuter.TimeoutChecker; |
|---|
| 24 | 23 | import net.driftingsouls.ds2.server.tick.rare.RestTick; |
|---|
| 25 | 24 | |
|---|
| … | … | |
| 33 | 32 | @Override |
|---|
| 34 | 33 | protected void executeTicks() { |
|---|
| | 34 | TimeoutChecker timeout = null; |
|---|
| 35 | 35 | try { |
|---|
| 36 | | TimeoutChecker timeout = new TimeoutChecker(20*60*1000) { |
|---|
| | 36 | timeout = new TimeoutChecker(20*60*1000) { |
|---|
| 37 | 37 | private Thread main = Thread.currentThread(); |
|---|
| 38 | 38 | |
|---|
| … | … | |
| 58 | 58 | publishStatus("berechne Sonstiges"); |
|---|
| 59 | 59 | execTick(RestTick.class, false); |
|---|
| 60 | | |
|---|
| 61 | | timeout.interrupt(); |
|---|
| 62 | 60 | } |
|---|
| 63 | 61 | catch( Throwable e ) { |
|---|
| … | … | |
| 65 | 63 | e.printStackTrace(); |
|---|
| 66 | 64 | Common.mailThrowable(e, "RareTick Exception", null); |
|---|
| | 65 | } |
|---|
| | 66 | finally { |
|---|
| | 67 | if( timeout != null ) { |
|---|
| | 68 | timeout.interrupt(); |
|---|
| | 69 | } |
|---|
| 67 | 70 | } |
|---|
| 68 | 71 | } |
|---|
| rfb092d4 |
r42c5976 |
|
| 41 | 41 | @Override |
|---|
| 42 | 42 | protected void executeTicks() { |
|---|
| | 43 | TimeoutChecker timeout = null; |
|---|
| 43 | 44 | try { |
|---|
| 44 | | TimeoutChecker timeout = new TimeoutChecker(20*60*1000) { |
|---|
| | 45 | timeout = new TimeoutChecker(20*60*1000) { |
|---|
| 45 | 46 | private Thread main = Thread.currentThread(); |
|---|
| 46 | 47 | |
|---|
| … | … | |
| 99 | 100 | Common.mailThrowable(e, "RegularTick Exception", null); |
|---|
| 100 | 101 | } |
|---|
| | 102 | finally { |
|---|
| | 103 | if( timeout != null ) { |
|---|
| | 104 | timeout.interrupt(); |
|---|
| | 105 | } |
|---|
| | 106 | } |
|---|
| 101 | 107 | } |
|---|
| 102 | 108 | |
|---|