Chromium Code Reviews| Index: adb/common.py |
| diff --git a/adb/common.py b/adb/common.py |
| index 197af011066a6ea0c291b5a63be2314cabf02fc4..a7b2d9f6124d05060f98dd6d910777b247d60872 100644 |
| --- a/adb/common.py |
| +++ b/adb/common.py |
| @@ -442,6 +442,17 @@ class TcpHandle(Handle): |
| finally: |
| self._connection = None |
| + def Reset(self, new_endpoint=None): |
| + self.Close() |
| + if new_endpoint: |
| + if ':' in new_endpoint: |
|
M-A Ruel
2016/07/23 00:58:43
I feel odd about this, shouldn't we create a new i
bpastene
2016/07/23 01:17:39
Yeah; I tried, but ran into a couple of problems:
M-A Ruel
2016/07/23 01:29:34
No, that's fine. Not worth reengineering.
|
| + (self._host, self._port) = new_endpoint.split(':') |
| + else: |
| + self._host = new_endpoint |
| + self._port = 5555 |
| + self._serial_number = '%s:%s' % (self._host, self._port) |
| + self.Open() |
| + |
| def BulkWrite(self, data, timeout_ms=None): |
| try: |
| self._connection.settimeout(self.Timeout(timeout_ms) / 1000.0) |