[server][Helpers] Fix the problem in which the previous timer isn't removed when GMainLoopAgent() is called multiple times.