From 3ddf80c0194b0da3c5222d02633c69269a992fb9 Mon Sep 17 00:00:00 2001 From: liris Date: Thu, 20 Nov 2014 14:08:24 +0900 Subject: [PATCH] fixed #130 --- examples/echoapp_client.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/examples/echoapp_client.py b/examples/echoapp_client.py index c77bbbd..f7e996a 100644 --- a/examples/echoapp_client.py +++ b/examples/echoapp_client.py @@ -2,7 +2,7 @@ import websocket try: import thread except ImportError: #TODO use Threading instead of _thread in python3 - import _thread + import _thread as thread import time import sys @@ -32,11 +32,7 @@ def on_open(ws): ws.close() print("Thread terminating...") - try: - thread.start_new_thread(run, ()) - except: - _thread.start_new_thread(run, ()) - + thread.start_new_thread(run, ()) if __name__ == "__main__": websocket.enableTrace(True)