mirror of
https://github.com//cppla/ServerStatus
synced 2025-06-05 15:19:50 +08:00
修复一个大bug, 网络不稳线程反复创建
This commit is contained in:
parent
1eddbfe6e8
commit
b1166a540c
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user