@ Override @ GuardedBy ( "hudson.model.Queue.lock" ) public long check ( final AbstractCloudComputer c ) { final AbstractCloudSlave computerNode = c . getNode ( ) ; if ( c . isIdle ( ) && computerNode != null ) { final long idleMilliseconds = System . currentTimeMillis ( ) - c . getIdleStartMilliseconds ( ) ; if ( idleMilliseconds > MINUTES . toMillis ( idleMinutes ) ) { LOG . info ( "Disconnecting {}, after {} min timeout." , c . getName ( ) , idleMinutes ) ; try { computerNode . terminate ( ) ; } catch ( InterruptedException | IOException e ) { LOG . warn ( "Failed to terminate {}" , c . getName ( ) , e ) ; } } } return 1 ; }
While x - stream serialisation buggy copy implementation .