Skip to content

Commit 67099fa

Browse files
fix: added extra exit code handling in "connect_to_port".
1 parent c272051 commit 67099fa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

IOSDeviceLib/IOSDeviceLib.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -1581,6 +1581,12 @@ void connect_to_port(std::string device_identifier, int port,
15811581
int usb_result =
15821582
USBMuxConnectByPort(connection_id, htons(port), &device_socket);
15831583

1584+
if (usb_result != 0) {
1585+
print_error("Failed to perform mux connect on device.", device_identifier,
1586+
method_id, usb_result);
1587+
return;
1588+
}
1589+
15841590
if (device_socket < 0) {
15851591
print_error("USBMuxConnectByPort returned bad file descriptor",
15861592
device_identifier, method_id, usb_result);

0 commit comments

Comments
 (0)