You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the InferenceServerClient object is not being closed properly after usage in the SimpleInferClient example. Since InferenceServerClient implements AutoCloseable, it should be managed using a try-with-resources statement to ensure proper resource cleanup and avoid potential resource leaks.
Additionally, there's a potential risk of a TimeoutException occurring when communicating with the inference server, but the code doesn't currently handle this. By wrapping the client usage inside a try-with-resources block and catching TimeoutException, we can ensure proper error handling and resource management.
Currently, the InferenceServerClient object is not being closed properly after usage in the SimpleInferClient example. Since InferenceServerClient implements AutoCloseable, it should be managed using a try-with-resources statement to ensure proper resource cleanup and avoid potential resource leaks.
Additionally, there's a potential risk of a TimeoutException occurring when communicating with the inference server, but the code doesn't currently handle this. By wrapping the client usage inside a try-with-resources block and catching TimeoutException, we can ensure proper error handling and resource management.
Proposed code
Updated whole code
Benefits:
The text was updated successfully, but these errors were encountered: