+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 11 to 15 of 15

Thread: Strange issue: a wait before login "hangs" the connection

  1. #11
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts
    Don't send a heart beat message before you get a successful login response. Odds are that's what is causing problems.

    If you lose your connection to the server, your client has to create a fresh new instance of ElectroServer and then connect again. You can't restart a connection.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  2. #12
    Member
    Join Date
    Mar 2012
    Posts
    44
    Thanks
    8
    Thanked 1 Time in 1 Post
    Ok.

    Can I consider the connection lost if I receive a ActionRequiresLogin?

  3. #13
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts
    I don't think that will break your connection, however if the client sends a heartbeat message before sending a LoginRequest, odds are very good that you will end up with a mismatch in expected messageId numbers, so that either the client or the server holds a message waiting for an expected messageId that never arrives. Just don't start your heartbeat until after a successful login.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  4. #14
    Member
    Join Date
    Mar 2012
    Posts
    44
    Thanks
    8
    Thanked 1 Time in 1 Post
    Maybe I wasn't clear.

    I understand the heartbeat issue.

    I Just wanted to know if it is correct to assume that the connection is broken if I receive a ActionRequiresLogin.

  5. #15
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts
    The connection isn't broken because you did get that message, but you should treat it as if it were broken because now your messageIds won't match correctly. Make a fresh instance of ElectroServer and connect and login again.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

+ Reply to Thread

Tags for this Thread

Posting Permissions

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