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

connection-error event is not fired #61

Open
nponeccop opened this issue Apr 15, 2019 · 0 comments
Open

connection-error event is not fired #61

nponeccop opened this issue Apr 15, 2019 · 0 comments

Comments

@nponeccop
Copy link
Collaborator

Expected behavior:

Abraxas Client fires an event whenever it detects that the server is dead

Current behavior:

Abraxas only fires an event if a server was alive and then dies. But if a server was never alive, it never fires an event

Sample code:

const Client = require('abraxas').Client
const client = Client.connect({servers: ['127.0.0.1'], defaultEncoding: 'utf8'})
const check = eventName => client.on(eventName, () => console.log(eventName))
check('connect')
check('disconnect')
check('connection-error')
setTimeout(() => client.echo("aaa", console.log), 10000)

If you start it without a gearman on 127.0.0.1, it never displays any message. I want it to emit a message when it detects that initial connection attempt failed.

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