Add invalidation handler to the game core connection to know when to kill the background process.