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

TypeError: Cannot read property 'connections' of undefined #2

Closed
sathishsoundharajan opened this issue Nov 18, 2015 · 2 comments
Closed
Assignees
Labels
bug Bug or defect
Milestone

Comments

@sathishsoundharajan
Copy link

Reprod.js

const Oppsy = require('oppsy');
const Hapi = require('hapi');

const server = new Hapi.Server();
//server.connection();
const oppsy = new Oppsy(server);
oppsy.on('ops', (data) => {
  console.log(data);
});

server.start(() => {
  oppsy.start(1000);
});
TypeError: Cannot read property 'connections' of undefined
    at Object.concurrents (d:\E-Learning\hapi-killer\node_modules\oppsy\lib\network.js:76:34)
    at Function.exports.parallel.execute (d:\E-Learning\hapi-killer\node_modules\oppsy\node_modules\items\lib\index.js:113:23)
    at null._repeat (d:\E-Learning\hapi-killer\node_modules\oppsy\lib\index.js:39:26)
    at wrapper [as _onTimeout] (timers.js:275:19)
    at Timer.listOnTimeout (timers.js:92:15)

While debugging this lib, i found that https://github.com/hapijs/oppsy/blob/master/lib/network.js#L77 this._server is undefined. Network Monitor this is not bind to concurrents func.

More Info:

"oppsy": "^1.0.0",
"hapi": "^11.0.0"
@arb arb added the bug Bug or defect label Nov 18, 2015
@arb arb added this to the 1.0.1 milestone Nov 18, 2015
@arb arb closed this as completed in b908c84 Nov 18, 2015
arb added a commit that referenced this issue Nov 18, 2015
@arb
Copy link
Contributor

arb commented Nov 18, 2015

@bboysathish thanks for spotting this so fast! Bug fix has been released!

@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bug or defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants