1 parent d26d470 commit 407247fCopy full SHA for 407247f
packager/react-packager/src/SocketInterface/SocketClient.js
@@ -29,7 +29,10 @@ class SocketClient {
29
30
this._sock = net.connect(sockPath);
31
this._ready = new Promise((resolve, reject) => {
32
- this._sock.on('connect', () => resolve(this));
+ this._sock.on('connect', () => {
33
+ this._sock.removeAllListeners('error');
34
+ resolve(this);
35
+ });
36
this._sock.on('error', (e) => {
37
e.message = `Error connecting to server on ${sockPath} ` +
38
`with error: ${e.message}`;
0 commit comments