From 6961fe94d2524cf2cc41609c63bf7e478a2fc929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 27 Mar 2011 16:43:03 +0200 Subject: [PATCH] Ensure to have only one instance of IPCServer running --- tryton/ipc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tryton/ipc.py b/tryton/ipc.py index 3f28f198a2..62ce5e83aa 100644 --- a/tryton/ipc.py +++ b/tryton/ipc.py @@ -19,6 +19,8 @@ class IPCServer(object): instance = None def __init__(self, hostname, port, database): + if Server.instance: + Server.instance.stop() self.hostname = hostname self.port = port self.database = database