Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "probe" method to check if client is still connected to the server #512

Open
jtnelson opened this issue May 1, 2024 · 0 comments
Open

Comments

@jtnelson
Copy link
Member

jtnelson commented May 1, 2024

  • Add probe method to Concourse client
  • Add probe method to the ConnectionPool that pulls a random connection and tests whether it is still connected
  • Implementation in 0.11 can call inventory() to see if the connection is still alive
  • In 0.12 add a thrift method called probe that returns true
  • In the client catch an exception for a broken pipe or inability to write and return false
  • Consider adding a reconnect() method that can be used to reestablish the connection if the probe fails
/**
 * Probes the current connection to the server.
 * <p>
 * This method checks if the client is still connected to the server by sending a query or signal
 * and awaiting a response. It is used to ensure the client's ability to communicate with the server
 * remains intact.
 * 
 * @return boolean - {@code true} if the client is currently connected to the server,
 *                   {@code false} otherwise.
 */
public boolean probe() {
    // implementation code here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant