Skip to content

Commit a2aad51

Browse files
TsvetanMilanovmbektchiev
authored andcommitted
Fix debug device/web socket closing (#2897)
When we close the websocket we have to destroy the device socket as well. We need to wait the close event on the device socket instead of end.
1 parent 060914d commit a2aad51

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/device-sockets/ios/socket-proxy-factory.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,13 @@ export class SocketProxyFactory extends EventEmitter implements ISocketProxyFact
132132
deviceSocket.on("close", () => {
133133
this.$logger.info("Backend socket closed!");
134134
if (!this.$options.watch) {
135-
process.exit(0);
135+
webSocket.close();
136136
}
137137
});
138138

139139
webSocket.on("close", () => {
140140
this.$logger.info('Frontend socket closed!');
141+
deviceSocket.destroy();
141142
if (!this.$options.watch) {
142143
process.exit(0);
143144
}

0 commit comments

Comments
 (0)