code: def terminate(self):
      
      # Tear down the Pailgun TCPServer.
      if self.pailgun:
        self.pailgun.server_close()
  
      super(PailgunService, self).terminate()
docs: Override of PantsService.terminate() that cleans up when the Pailgun server is terminated.