mirror of
https://github.com/danbulant/node-x11
synced 2026-05-24 12:35:39 +00:00
save reference to client before emitting connect event
This commit is contained in:
parent
f41ec2f635
commit
9b439d3d80
1 changed files with 1 additions and 1 deletions
|
|
@ -302,6 +302,7 @@ XClient.prototype.startHandshake = function()
|
||||||
// emit error in that case
|
// emit error in that case
|
||||||
client.expectReplyHeader();
|
client.expectReplyHeader();
|
||||||
client.display = display;
|
client.display = display;
|
||||||
|
display.client = client;
|
||||||
client.emit('connect', display);
|
client.emit('connect', display);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -351,7 +352,6 @@ module.exports.createClient = function(initCb, display)
|
||||||
if (initCb)
|
if (initCb)
|
||||||
{
|
{
|
||||||
client.on('connect', function(display) {
|
client.on('connect', function(display) {
|
||||||
display.client = client;
|
|
||||||
initCb(display);
|
initCb(display);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue