fingerprint-container-node-sdk
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -30,6 +30,7 @@ var util = require('util'); | ||
hasErrorFn && error({ | ||
error: "timeout", | ||
error: new Error('timeout'), | ||
serviceName: serviceName, | ||
body: body, | ||
askId: askId | ||
askId: askId, | ||
msg: null | ||
}); | ||
@@ -40,3 +41,5 @@ }, timeout || 1500); | ||
askId: msg.askId, | ||
callback: success, | ||
serviceName: serviceName, | ||
success: success, | ||
error: error, | ||
timer: timer, | ||
@@ -67,3 +70,13 @@ index: this.rpcs.length | ||
clearTimeout(rpcInfo.timer); | ||
rpcInfo.callback(msg.body); | ||
if (msg.code == 0) { | ||
rpcInfo.success(msg.body, msg); | ||
} else if (rpcInfo.error) { | ||
rpcInfo.error({ | ||
error: new Error('error'), | ||
serviceName: rpcInfo.serviceName, | ||
body: msg.body, | ||
askId: rpcInfo.askId, | ||
msg: msg | ||
}); | ||
} | ||
this.rpcs.splice(rpcInfo.index, 1); | ||
@@ -70,0 +83,0 @@ } |
{ | ||
"name": "fingerprint-container-node-sdk", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "fingerprint container's sdk", | ||
@@ -5,0 +5,0 @@ "main": "fpc.js", |
@@ -6,3 +6,3 @@ var assert = require('assert'); | ||
var SERVICE_HOST = '172.16.90.65'; | ||
var SERVICE_HOST = '172.16.90.42'; | ||
var SERVICE_PORT = 9900; | ||
@@ -9,0 +9,0 @@ |
@@ -5,3 +5,4 @@ var assert = require('assert'); | ||
var SERVICE_HOST = '172.16.90.65'; | ||
var SERVICE_HOST = '172.16.90.42'; | ||
var SERVICE_PORT = 9900; | ||
@@ -8,0 +9,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33758
25
824