1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-24 15:58:08 +00:00

Handle a race condition at project closing

Fix #1015
This commit is contained in:
Julien Duponchelle 2017-05-05 19:39:06 +02:00
parent 3070a68273
commit 6870749e50
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -112,7 +112,10 @@ class ProjectHandler:
if ProjectHandler._notifications_listening.setdefault(project.id, 0) <= 1: if ProjectHandler._notifications_listening.setdefault(project.id, 0) <= 1:
yield from project.close() yield from project.close()
pm.remove_project(project.id) pm.remove_project(project.id)
del ProjectHandler._notifications_listening[project.id] try:
del ProjectHandler._notifications_listening[project.id]
except KeyError:
pass
else: else:
log.warning("Skip project closing, another client is listening for project notifications") log.warning("Skip project closing, another client is listening for project notifications")
response.set_status(204) response.set_status(204)