mirror of https://github.com/status-im/metro.git
Don't swallow client errors
Reviewed By: @swarr Differential Revision: D2472285
This commit is contained in:
parent
1ce0853c39
commit
16a9a5beda
|
@ -29,7 +29,10 @@ class SocketClient {
|
|||
|
||||
this._sock = net.connect(sockPath);
|
||||
this._ready = new Promise((resolve, reject) => {
|
||||
this._sock.on('connect', () => resolve(this));
|
||||
this._sock.on('connect', () => {
|
||||
this._sock.removeAllListeners('error');
|
||||
resolve(this);
|
||||
});
|
||||
this._sock.on('error', (e) => {
|
||||
e.message = `Error connecting to server on ${sockPath} ` +
|
||||
`with error: ${e.message}`;
|
||||
|
|
Loading…
Reference in New Issue