Skip to content

Commit 90fa4fe

Browse files
TsvetanMilanovmbektchiev
authored andcommitted
Fix debug device/web socket closing
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 84a2bd3 commit 90fa4fe

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
@@ -131,12 +131,13 @@ export class SocketProxyFactory extends EventEmitter implements ISocketProxyFact
131131
deviceSocket.on("close", () => {
132132
this.$logger.info("Backend socket closed!");
133133
if (!this.$options.watch) {
134-
process.exit(0);
134+
webSocket.close();
135135
}
136136
});
137137

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

0 commit comments

Comments
 (0)