janmonschke / diffsync

Enables real-time collaborative editing of arbitrary JSON objects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prototypal inheritance with EventEmitter

mvladic opened this issue · comments

I'm experiencing some bugs because _events from EventEmitter is shared between Client instances.

Check this out:

nodejs/node-v0.x-archive#7157

In client.js, instead of:

// inherit from EventEmitter
Client.prototype = new EventEmitter();

it should be:

// inherit from EventEmitter
util.inherits(Client, EventEmitter);