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 · 1 comment
Assignees
Labels
bug
Milestone

Comments

@sathishsoundharajan
Copy link

@sathishsoundharajan sathishsoundharajan commented Nov 18, 2015

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 label Nov 18, 2015
@arb arb added this to the 1.0.1 milestone Nov 18, 2015
@arb arb closed this in b908c84 Nov 18, 2015
arb added a commit that referenced this issue Nov 18, 2015
Fixes #2.
@arb

This comment has been minimized.

Copy link
Contributor

@arb arb commented Nov 18, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.