mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-18 14:04:20 +01:00
Make server_connect_to() return a bool
The resulting socket is accessible from the server instance, there is no need to return it. This paves the way to use several sockets in parallel.
This commit is contained in:
@@ -290,13 +290,14 @@ scrcpy(const struct scrcpy_options *options) {
|
||||
goto finally_destroy_server;
|
||||
}
|
||||
|
||||
socket_t device_socket = server_connect_to(&server);
|
||||
if (device_socket == INVALID_SOCKET) {
|
||||
if (!server_connect_to(&server)) {
|
||||
server_stop(&server);
|
||||
ret = false;
|
||||
goto finally_destroy_server;
|
||||
}
|
||||
|
||||
socket_t device_socket = server.device_socket;
|
||||
|
||||
char device_name[DEVICE_NAME_FIELD_LENGTH];
|
||||
struct size frame_size;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user