Make connection_handler overridable per thread