From 0a006083e881aee95999d0c8c8a731132895983f Mon Sep 17 00:00:00 2001 From: Alan Boudreault Date: Tue, 14 Jun 2016 19:13:26 -0400 Subject: [PATCH] Fix asyncore re-initialization in case of a fork --- cassandra/io/asyncorereactor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cassandra/io/asyncorereactor.py b/cassandra/io/asyncorereactor.py index 8481ab7e..af7de4a8 100644 --- a/cassandra/io/asyncorereactor.py +++ b/cassandra/io/asyncorereactor.py @@ -278,6 +278,8 @@ class AsyncoreConnection(Connection, asyncore.dispatcher): @classmethod def handle_fork(cls): + global _dispatcher_map + _dispatcher_map = {} if cls._loop: cls._loop._cleanup() cls._loop = None