Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requester.js cannot shutdown while monitor.js is running #88

Open
gerberasa opened this issue Apr 12, 2018 · 0 comments
Open

requester.js cannot shutdown while monitor.js is running #88

gerberasa opened this issue Apr 12, 2018 · 0 comments

Comments

@gerberasa
Copy link

gerberasa commented Apr 12, 2018

If we run requester.js without monitor.js, we can shutdown requester without problem.
But when monitor.js is running, we cannot shutdown the requester.js (always shown "SIGINT signal received" line after line). Run on Windows7.

NB: same issue with monitoring-tool.js

`
//requester.js

const cote = require('cote')
const requester = new cote.Requester({name: 'currency conversion requester' , namespace : 'rnd' })

//build request array
const request = { type: 'randomRequest' , from : 'usd' , to : 'eur' , amount : 100 }

requester.send(request, (res) => {
console.log('Sent request: ' + request)
console.log('Received response: ' + res)
})

//graceful shutdown
process.on('SIGINT', function(){
console.log('SIGINT signal received')
requester.close(function(){process.exit(0)})})

//graceful shutdown
process.on('SIGTERM', function(){
console.log('SIGTERM signal received')
requester.close(function(){process.exit(0)})})
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant