Comparing version 0.1.5 to 0.1.6
@@ -15,2 +15,9 @@ const childProcess = require('child_process'); | ||
function exit(code) { | ||
if (go) { | ||
go.kill(); | ||
} | ||
process.exit(code); | ||
} | ||
function callDone(requestId, err, data) { | ||
@@ -24,3 +31,3 @@ var done = requestId ? dones[requestId] : null; | ||
console.error('cannot call done for request ID ' + requestId); | ||
process.exit(1); | ||
exit(1); | ||
} | ||
@@ -40,3 +47,3 @@ done(err, data); | ||
if (++failCount > MAX_FAILS) { | ||
process.exit(1); // force container restart | ||
exit(1); | ||
} | ||
@@ -77,7 +84,7 @@ spawnSubProcess(); | ||
console.error('go-lambda already initialized'); | ||
process.exit(1); | ||
exit(1); | ||
} else if (typeof spawnOverride != 'undefined') { | ||
if (typeof spawnOverride != 'function') { | ||
console.error('spawnOverride must be function'); | ||
process.exit(1); | ||
exit(1); | ||
} | ||
@@ -92,3 +99,3 @@ spawn = spawnOverride; | ||
console.error('go-lambda not initialized'); | ||
process.exit(1); | ||
exit(1); | ||
} | ||
@@ -95,0 +102,0 @@ currentRequestId = context.awsRequestId; |
{ | ||
"name": "go-lambda", | ||
"description": "Call Go GRPC services from AWS Lambda functions.", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -26,3 +26,3 @@ # go-lambda | ||
See the [contributors](https://github.com/pilwon/go-lambda/graphs/contributors). | ||
See the [contributors](https://github.com/pilwon/go-lambda/graphs/contributors). | ||
@@ -29,0 +29,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
9221
235