Skip to content

Commit

Permalink
core-edge: revert some timeout service changes
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfurmanski authored and jimwebber committed Jul 14, 2016
1 parent a172b30 commit ef9b7e7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import org.neo4j.logging.LogProvider;

import static java.lang.System.nanoTime;

import static org.neo4j.kernel.impl.util.JobScheduler.SchedulingStrategy.POOLED;

/**
Expand Down Expand Up @@ -149,7 +148,17 @@ public synchronized void run()
}
}

triggered.forEach( ScheduledRenewableTimeout::trigger );
for ( ScheduledRenewableTimeout timeout : triggered )
{
try
{
timeout.trigger();
}
catch ( Throwable e )
{
log.error( "Exception triggering timeout handler", e );
}
}

synchronized ( timeouts )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,22 +280,18 @@ private synchronized void onScheduledTimeoutExpiry()
if ( timedOut() )
{
onTimeout();
return;
}

if ( timeoutAbsoluteMillis <= 0 )
{
return;
}

long timeLeft = timeoutAbsoluteMillis - clock.millis();
if ( timeLeft > 0 )
{
scheduleTimeout( timeLeft );
}
else
else if ( timeoutAbsoluteMillis != 0 )
{
onTimeout();
long timeLeft = timeoutAbsoluteMillis - clock.millis();
if ( timeLeft > 0 )
{
scheduleTimeout( timeLeft );
}
else
{
onTimeout();
}
}
}

Expand Down

0 comments on commit ef9b7e7

Please sign in to comment.