This commit is contained in:
sangge 2023-10-24 20:01:57 +08:00
commit f55b581059

View File

@ -33,7 +33,7 @@ def send_ip():
url = server_address + "/get_node?ip=" + ip url = server_address + "/get_node?ip=" + ip
# ip = get_local_ip() # type: ignore # ip = get_local_ip() # type: ignore
global id global id
id = requests.get(url) id = requests.get(url,timeout=3)
# 用环境变量获取本机ip # 用环境变量获取本机ip
@ -50,7 +50,7 @@ def init():
def clear(): def clear():
pass print("exit node")
# 接收用户发来的消息,经过处理之后,再将消息发送给其他用户 # 接收用户发来的消息,经过处理之后,再将消息发送给其他用户
@ -63,7 +63,7 @@ async def send_heartbeat_internal() -> None:
while True: while True:
# print('successful send my_heart') # print('successful send my_heart')
try: try:
folderol = requests.get(url) folderol = requests.get(url,timeout=3)
except: except:
print("Central server error") print("Central server error")