Default #halt timeout is 3s, now user configurable
This commit is contained in:
parent
e840823092
commit
8f20ccbcf3
|
@ -105,8 +105,9 @@ Cylon.config = function(key) {
|
|||
//
|
||||
// Returns nothing
|
||||
Cylon.halt = function halt(callback) {
|
||||
// set a timeout, in case trying to shut everything down nicely doesn't work
|
||||
Utils.after((1.5).seconds(), callback);
|
||||
// if robots can't shut down quickly enough, forcefully self-terminate
|
||||
var timeout = Config.halt_timeout || 3000
|
||||
Utils.after(timeout, callback);
|
||||
|
||||
var fns = [];
|
||||
|
||||
|
|
Loading…
Reference in New Issue