解决关闭dhcp时崩溃的问题,解决关闭软件时dhcp线程未退出的问题

This commit is contained in:
ranchuan
2023-12-13 18:28:02 +08:00
parent 545fcccef9
commit 77d3b964ef
3 changed files with 10 additions and 2 deletions

View File

@@ -120,5 +120,7 @@
添加huffman压缩编码,已完成编码,未验证
2023.12.9
删除huffman相关分析工具不过滤异常数据
2023.12.13
解决关闭dhcp时崩溃的问题解决关闭软件时dhcp线程未退出的问题

View File

@@ -489,6 +489,9 @@ if __name__ == "__main__":
# data=bytearray([0x01,100,0])
# data=bytearray([0x02]) # 上升
# data=bytearray([0x03]) # 下降
# 直接测量
u.cmd=0x44
data=bytearray([5])
print(u.encode(data).hex(' '))
# with open("file/EX_Coder_Test_2023-07-6.json","rb") as f:
@@ -511,5 +514,6 @@ if __name__ == "__main__":
# 59 6d 03 00 30 00 00 60 0f
# 结束应答
# 59 6D 03 00 31 00 00 31 CF
# 直接检测
# 59 6d 04 00 44 00 00 05 d5 6c

View File

@@ -160,6 +160,8 @@ class updata_dlg(QWidget):
if(self.udp is not None):
print("close udp thread")
self.udp.close()
if(self.dhcp_server is not None):
self.dhcp_server.close()
# 初始化文件列表
def file_list_init(self):
@@ -546,7 +548,7 @@ class updata_dlg(QWidget):
self.dhcp_server.run_in_thread()
else:
self.dhcp_but.setEnabled(False)
self.dhcp_server.new_ip_addr_signal.disconnect(dlg.add_slave_slot)
self.dhcp_server.new_ip_addr_signal.disconnect(self.add_slave_slot)
self.dhcp_server.close()
def dhcp_start_slot(self):
self.dhcp_but.setText("关闭DHCP")