mirror of
https://github.com/danbulant/node-x11
synced 2026-05-26 21:42:04 +00:00
Merge pull request #125 from Arteris/handshake_error
Unpack handshake error
This commit is contained in:
commit
88370a111e
1 changed files with 8 additions and 3 deletions
|
|
@ -116,9 +116,14 @@ bl.unpack('C', function(res) {
|
||||||
if (res[0] == 0)
|
if (res[0] == 0)
|
||||||
{
|
{
|
||||||
// conection time error
|
// conection time error
|
||||||
// unpack error (? TODO)
|
// unpack error
|
||||||
var err = new Error;
|
bl.unpack('Cxxxxxx', function (rlen) {
|
||||||
cb(err); // TODO: detect that this is error on xcore side
|
bl.get(rlen[0], function (reason) {
|
||||||
|
var err = new Error;
|
||||||
|
err.message = 'X server connection failed: ' + reason.toString();
|
||||||
|
cb(err);
|
||||||
|
});
|
||||||
|
});
|
||||||
// TODO: do we need to close stream from our side?
|
// TODO: do we need to close stream from our side?
|
||||||
// TODO: api to close source stream via attached unpackstream
|
// TODO: api to close source stream via attached unpackstream
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue