Skip to content

Commit 8da5dd6

Browse files
committed
Fixed serving on localhost only in the semihosting telnet server.
- This was fixed for the gdbserver but telnet was missed.
1 parent 89b7cd1 commit 8da5dd6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pyocd/debug/semihost.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,10 @@ def __init__(self, port_or_url, serve_local_only=True):
304304
self._port = 0
305305
else:
306306
self._abstract_socket = GDBSocket(port_or_url, 4096)
307-
self._abstract_socket.init()
308-
self._port = self._abstract_socket.port
309307
if serve_local_only:
310308
self._abstract_socket.host = 'localhost'
309+
self._abstract_socket.init()
310+
self._port = self._abstract_socket.port
311311
self._buffer = bytearray()
312312
self._buffer_lock = threading.Lock()
313313
self.connected = None

0 commit comments

Comments
 (0)