Changeset 42c5976381076d506e8d4af052b68ee57663cdeb

Show
Ignore:
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
  • src/net/driftingsouls/ds2/server/tick/RareTick.java

    rfb092d4 r42c5976  
    2121import net.driftingsouls.ds2.server.framework.Common; 
    2222import net.driftingsouls.ds2.server.framework.Configuration; 
    23 import net.driftingsouls.ds2.server.tick.AbstractTickExecuter.TimeoutChecker; 
    2423import net.driftingsouls.ds2.server.tick.rare.RestTick; 
    2524 
     
    3332        @Override 
    3433        protected void executeTicks() { 
     34                TimeoutChecker timeout = null; 
    3535                try { 
    36                         TimeoutChecker timeout = new TimeoutChecker(20*60*1000) { 
     36                        timeout = new TimeoutChecker(20*60*1000) { 
    3737                                private Thread main = Thread.currentThread(); 
    3838                                 
     
    5858                        publishStatus("berechne Sonstiges"); 
    5959                        execTick(RestTick.class, false); 
    60                          
    61                         timeout.interrupt(); 
    6260                } 
    6361                catch( Throwable e ) { 
     
    6563                        e.printStackTrace(); 
    6664                        Common.mailThrowable(e, "RareTick Exception", null); 
     65                } 
     66                finally { 
     67                        if( timeout != null ) { 
     68                                timeout.interrupt(); 
     69                        } 
    6770                } 
    6871        } 
  • src/net/driftingsouls/ds2/server/tick/RegularTick.java

    rfb092d4 r42c5976  
    4141        @Override 
    4242        protected void executeTicks() { 
     43                TimeoutChecker timeout = null; 
    4344                try { 
    44                         TimeoutChecker timeout = new TimeoutChecker(20*60*1000) { 
     45                        timeout = new TimeoutChecker(20*60*1000) { 
    4546                                private Thread main = Thread.currentThread(); 
    4647                                 
     
    99100                        Common.mailThrowable(e, "RegularTick Exception", null); 
    100101                } 
     102                finally { 
     103                        if( timeout != null ) { 
     104                                timeout.interrupt(); 
     105                        } 
     106                } 
    101107        } 
    102108