hufeng commented on issue #9: 接口调用的timeout跟着接口的timeout参数,而不是dubbo对象创建时候的超时时间 URL: https://github.com/apache/dubbo-js/issues/9#issuecomment-570605052 是秒,代码在queue.ts中的 /** * 超时检测 * @param ctx */ private _checkTimeout(ctx: Context) { //先获取上下文设置的超时时间,如果没有设置就获取最大超时时间 const timeout = (ctx.timeout || config.dubboInvokeTimeout) * 1000; log('check timeout: ctx.timeout-> %d @timeout: %d', ctx.timeout, timeout); ctx.timeoutId = setTimeout(() => { statistics.timeoutErrCount++; const {requestId, dubboInterface, methodName} = ctx.request; log(`err: ${dubboInterface}#${methodName} remote invoke timeout`); this.failed( requestId, new DubboTimeoutError( `err:${dubboInterface}#${methodName} remote invoke timeout`, ), ); }, timeout); } } yingjie.li <[email protected]> 于2020年1月3日周五 上午10:14写道: > timeout单位是什么,秒还是毫秒? > [image: image] > <https://user-images.githubusercontent.com/17809360/71703830-d4ef5d80-2e11-11ea-97a9-906cb22a26ec.png> > 示例代码是秒,但是看源码中没有 * 1000 > > — > You are receiving this because you modified the open/close state. > Reply to this email directly, view it on GitHub > <https://github.com/apache/dubbo-js/issues/9?email_source=notifications&email_token=AAECEEFBBHEFYKWQEDKRQTTQ32NRVA5CNFSM4E4HFEAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIACVSI#issuecomment-570436297>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAECEEEQ3FIQM7KVQUT6QSDQ32NRVANCNFSM4E4HFEAA> > . >
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
