MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / close

Method close

fastdeploy/inter_communicator/zmq_server.py:375–392  ·  view source on GitHub ↗

Close the socket and context, and remove the IPC files.

(self)

Source from the content-addressed store, hash-verified

373 llm_logger.warning(f"Failed to remove IPC file {name} - {e}")
374
375 def close(self):
376 """
377 Close the socket and context, and remove the IPC files.
378 """
379 if not self.running:
380 return
381
382 self.running = False
383 llm_logger.info("ZMQ server is closing connection...")
384 try:
385 if self.socket is not None and not self.socket.closed:
386 self.socket.close()
387 if not self.context.closed:
388 self.context.term()
389 self._clear_ipc(self.file_name)
390 except Exception as e:
391 llm_logger.warning(f"ZMQ server failed to close connection - {e}")
392 return
393
394
395class ZmqTcpServer(ZmqServerBase):

Callers 3

closeMethod · 0.45

Calls 3

_clear_ipcMethod · 0.95
termMethod · 0.80
infoMethod · 0.45