Fix asyncore re-initialization in case of a fork
This commit is contained in:
@@ -278,6 +278,8 @@ class AsyncoreConnection(Connection, asyncore.dispatcher):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def handle_fork(cls):
|
def handle_fork(cls):
|
||||||
|
global _dispatcher_map
|
||||||
|
_dispatcher_map = {}
|
||||||
if cls._loop:
|
if cls._loop:
|
||||||
cls._loop._cleanup()
|
cls._loop._cleanup()
|
||||||
cls._loop = None
|
cls._loop = None
|
||||||
|
Reference in New Issue
Block a user