Addresses issue where wsproxy utilizes 100% CPU. The process now rarely goes over 2%
This commit is contained in:
parent
c539e4dcda
commit
3ec5d7c0a3
|
@ -10,6 +10,8 @@ as taken from http://docs.python.org/dev/library/ssl.html#certificates
|
|||
'''
|
||||
|
||||
import sys, os, socket, ssl, time, traceback, re
|
||||
import time
|
||||
|
||||
from base64 import b64encode, b64decode
|
||||
from select import select
|
||||
|
||||
|
@ -62,6 +64,8 @@ def proxy(client, target):
|
|||
socks = [client, target]
|
||||
|
||||
while True:
|
||||
time.sleep(0.01) # 10ms
|
||||
|
||||
ins, outs, excepts = select(socks, socks, socks, 1)
|
||||
if excepts: raise Exception("Socket exception")
|
||||
|
||||
|
|
Loading…
Reference in New Issue