修复一个大bug, 网络不稳线程反复创建

This commit is contained in:
ubuntu 2018-08-30 15:10:25 +08:00
parent 1eddbfe6e8
commit b1166a540c
2 changed files with 2 additions and 2 deletions

@ -224,6 +224,7 @@ if __name__ == '__main__':
elif 'INTERVAL' in argc:
INTERVAL = int(argc.split('INTERVAL=')[-1])
socket.setdefaulttimeout(30)
get_packetLostRate()
while 1:
try:
print("Connecting...")
@ -256,7 +257,6 @@ if __name__ == '__main__':
traffic = Traffic()
traffic.get()
get_packetLostRate()
while 1:
CPU = get_cpu()
NetRx, NetTx = traffic.get()

@ -193,6 +193,7 @@ if __name__ == '__main__':
elif 'INTERVAL' in argc:
INTERVAL = int(argc.split('INTERVAL=')[-1])
socket.setdefaulttimeout(30)
get_packetLostRate()
while 1:
try:
print("Connecting...")
@ -225,7 +226,6 @@ if __name__ == '__main__':
traffic = Traffic()
traffic.get()
get_packetLostRate()
while 1:
CPU = get_cpu()
NetRx, NetTx = traffic.get()