Skip to content

Commit 9aab567

Browse files
committed
[lldb] Made socket verification process more generic
1 parent 1fdc2f8 commit 9aab567

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,11 @@ def remove_port_forward():
249249

250250
def _verify_socket(self, sock):
251251
# Normally, when the remote stub is not ready, we will get ECONNREFUSED during the
252-
# connect() attempt. However, due to the way how ADB forwarding works, on android targets
252+
# connect() attempt. However, due to the way how port forwarding can work, on some targets
253253
# the connect() will always be successful, but the connection will be immediately dropped
254-
# if ADB could not connect on the remote side. This function tries to detect this
254+
# if we could not connect on the remote side. This function tries to detect this
255255
# situation, and report it as "connection refused" so that the upper layers attempt the
256256
# connection again.
257-
triple = self.dbg.GetSelectedPlatform().GetTriple()
258-
if not re.match(".*-.*-.*-android", triple):
259-
return # Not android.
260257
can_read, _, _ = select.select([sock], [], [], 0.1)
261258
if sock not in can_read:
262259
return # Data is not available, but the connection is alive.

0 commit comments

Comments
 (0)