Results 1 to 2 of 2

Thread: Confusing implementation of client.isConnected()

  1. #1

    Default Confusing implementation of client.isConnected()

    I found an old thread that reported that client.isConnected() is really only telling us if the client was ever accepted.

    I'm wondering why we don't clarify that to say client.wasConnected() or something.. and actually have that isConnected() method tell us actually if the client is connected or not.

    So this method:

    public void onDisconnect(IClient client) {
    getLogger().info("IsConnected: " + client.isConnected());

    Would work properly.

    I have some logic that executes after the client disconnects and was checking the isConnected() property only to find that it wasn't reliable. So I had to set a custom client property to say if they are connected or not based on the client accepted method and the onDisconnect method.

    Just a suggestion to consider!


  2. #2
    Join Date
    May 2013


    Hello Jake,

    You are correct, adding a property (WMSProperties) to flag the connection is a good way to solve the problem. I will forward the suggestion for wasConnected() to our product management team.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts