This commit is contained in:
aozhiwei 2018-12-27 16:28:23 +08:00
parent 7250700376
commit dfc57226ea
2 changed files with 2 additions and 3 deletions

View File

@ -39,6 +39,7 @@ class ClientSide:
'remoteConnIdx' : idx,
'data' : str(base64.b64encode(data))
})
break
except:
print('qqqqq', flush=True)
break
@ -52,10 +53,8 @@ class ClientSide:
try:
while True:
data += yield self.remote_conn.read_message()
print(data, flush=True)
if not data:
continue
print(data, flush=True)
lines = data.split('\n')
if data[-1] == '\n':
data = lines[-1]

View File

@ -165,7 +165,7 @@ class RemoteServer(tornado.tcpserver.TCPServer):
if not app.addRemoteConn(conn):
stream.close()
return
await tornado.gen.sleep(2)
await tornado.gen.sleep(0.3)
if not app.isConnectOk(conn.idx):
stream.close()
return