Compare commits

...

3 Commits

Author SHA1 Message Date
e6ebeeb8ca Shorter timeout: 3s 2024-11-03 09:36:23 +08:00
b7ba3b3ea2 Treat undefine as 0 2022-04-05 16:14:06 +09:00
836bdfd33d Load config from config/all 2022-04-03 21:55:10 +09:00

View File

@ -4,7 +4,7 @@ const Dragonfly = global.Dragonfly;
const cl = global.botanLoader;
const fs = require( "fs" );
const conf = cl.load( "config.sx.mvc" );
const conf = cl.load( "config.all" ).sx.mvc;
class Chain
{
@ -65,7 +65,7 @@ class Chain
// MultiChain
Multi( name, handler, l, timeout, trigger )
{
if( l == 0 )
if( l == 0 || l === undefined )
{
Dragonfly.Info( "MultiChain " + name + ": length is zero, directly running handler" );
handler.apply( undefined, [] );
@ -74,8 +74,8 @@ class Chain
var _self = this;
// Limit the timeout of callbacks to 30 secs
if( timeout == undefined ) timeout = 30000;
// Limit the timeout of callbacks to 3 secs
if( timeout == undefined ) timeout = 3000;
return (function()
{