Skip to content

Commit 3e60e4f

Browse files
authored
Fixing FindUnusedPort method tcp_socket object with proper constructor parameter
TCPSocket(bool should_close, bool child_processes_inherit) constructor was removed in commit c1dff71. However, the tcp_socket object creation still passes the deleted constructor parameters, which causes the invocation of the wrong constructor. As a result, the FindUnusedPort method is unable to resolve the local port and always returns 0.
1 parent 737d6ca commit 3e60e4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static Status DeleteForwardPortWithAdb(uint16_t local_port,
6464

6565
static Status FindUnusedPort(uint16_t &port) {
6666
Status error;
67-
std::unique_ptr<TCPSocket> tcp_socket(new TCPSocket(true, false));
67+
std::unique_ptr<TCPSocket> tcp_socket(new TCPSocket(true));
6868
if (error.Fail())
6969
return error;
7070

0 commit comments

Comments
 (0)