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

Method close

fastdeploy/inter_communicator/zmq_client.py:170–184  ·  view source on GitHub ↗

Close the socket and context.

(self)

Source from the content-addressed store, hash-verified

168 self.socket.connect(address)
169
170 def close(self):
171 """
172 Close the socket and context.
173 """
174 llm_logger.info("ZMQ client is closing connection...")
175 try:
176 if self.socket is not None and not self.socket.closed:
177 self.socket.setsockopt(zmq.LINGER, 0)
178 self.socket.close()
179 if self.context is not None:
180 self.context.term()
181
182 except Exception as e:
183 llm_logger.warning(f"ZMQ client failed to close connection - {e}")
184 return

Callers

nothing calls this directly

Calls 3

setsockoptMethod · 0.80
termMethod · 0.80
infoMethod · 0.45

Tested by

no test coverage detected