pass lazy connection in core.preinit event (reverse-merged from commit e3940ff761d2358b5d31b55c387f3d693d32db9d)