突发灵感,单进程的自我守护

TAG=1服务器


def main():spa

global TAG代理

try:it

Proxy(('',6001)).serve_forever()#代理服务器监听的地址io

TAG=0im

except Exception as e :while

TAG=1time

print e

traceback.print_exc()


if __name__ == '__main__':

while True:

if TAG:

main()

time.sleep(0.5)

相关文章
相关标签/搜索