mirror of
https://github.com/openwrt-xiaomi/xmir-patcher.git
synced 2026-09-22 22:57:55 +03:00
gateway: Fix close shared memory object on non Win32 platforms
This commit is contained in:
@@ -381,6 +381,11 @@ class Gateway():
|
||||
#===============================================================================
|
||||
def free_memcfg(self):
|
||||
if self.memcfg:
|
||||
if os.name != "nt":
|
||||
try:
|
||||
self.memcfg.unlink()
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
self.memcfg.close() # https://docs.python.org/3/library/multiprocessing.shared_memory.html
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user