def terminate(self):
    # Tear down the Pailgun TCPServer.
    if self.pailgun:
      self.pailgun.server_close()

    super(PailgunService, self).terminate()
Override of PantsService.terminate() that cleans up when the Pailgun server is terminated.
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/pantsd/service/pailgun_service.py/PailgunService.terminate