mirror of
https://github.com/danbulant/node-x11
synced 2026-05-21 13:29:13 +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
|
||||
client.expectReplyHeader();
|
||||
client.display = display;
|
||||
display.client = client;
|
||||
client.emit('connect', display);
|
||||
});
|
||||
}
|
||||
|
|
@ -351,7 +352,6 @@ module.exports.createClient = function(initCb, display)
|
|||
if (initCb)
|
||||
{
|
||||
client.on('connect', function(display) {
|
||||
display.client = client;
|
||||
initCb(display);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue