如何在nodejs上设置Thrift客户端的超时?

时间:2017-11-20 09:55:15

标签: node.js thrift

当我向Thrift服务器发送请求时,我想设置超时。我该怎么办?

// 创建连接和客户端
const options = {
  connect_timeout: 1000,
  timeout: 1000,
  transport: thrift.TBufferedTransport,
  protocol: thrift.TBinaryProtocol
};

0 个答案:

没有答案