Skip to content

Commit 3161212

Browse files
committed
fixed testing ui script
1 parent b63f1a4 commit 3161212

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

socket/testingui.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def __init__(self):
8181
def ws_connect(self):
8282
'''Connect. Opens websocket connection.'''
8383
if self.client is None and self.hostentry.get() is not None:
84-
#self.start_connection()
8584
self.ws_thread = threading.Thread(target=self.start_connection)
8685
self.ws_thread.start()
8786
self.status_thread = threading.Thread(target=self.on_status_change)
@@ -90,7 +89,10 @@ def ws_connect(self):
9089
def start_connection(self):
9190
'''Opens connection'''
9291
self.client = websocket.WebsocketController(None, None, None)
93-
self.client.begin_connection("wss://echo.websocket.org")
92+
port = 80
93+
if(self.portentry.get() is not None:
94+
port int(self.portentry.get())
95+
self.client.begin_connection(self.hostentry.get(), port)
9496

9597

9698
def send(self, event):

0 commit comments

Comments
 (0)