Skip to content

Commit

Permalink
update forward to drain the extra output
Browse files Browse the repository at this point in the history
  • Loading branch information
codeskyblue committed May 6, 2024
1 parent 97a3cbf commit 0116f5c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions adbutils/_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ def forward(self, local: str, remote: str, norebind: bool = False):
c.send_command(":".join(args))
c.check_okay() # this OKAY means message was received
c.check_okay() # check reponse
# when successfully forwarded, port string will response, eg: "00041237"
# here we just read it and ignore
c.read_until_close()

def forward_port(self, remote: Union[int, str]) -> int:
"""forward remote port to local random port"""
Expand Down

0 comments on commit 0116f5c

Please sign in to comment.