Search Unity

Disconnect and CloseConnection bug?

Discussion in 'Multiplayer' started by jeffcraighead, May 5, 2008.

  1. jeffcraighead

    jeffcraighead

    Joined:
    Nov 15, 2006
    Posts:
    740
    I'm just trying to clean up my multiplayer code and make it more robust. One thing I noticed that I consider a bug (and I don't know how to get around without maybe mucking things up) is that when a client disconnects from a server the server still keeps the client in its connections list.

    This isn't horrible except that when the client reconnects none of the buffered RPCs are sent again, so the client never loads the level. I can understand that on an unclean disconnect the server might keep the client in the list for a bit incase it was due to a bad connection which may pop back online. However when the client notifies the server that it is disconnecting, it should be promptly removed from the clients list.

    Am I missing some call that would make this entry go away?

    Thanks!
     
  2. jeffcraighead

    jeffcraighead

    Joined:
    Nov 15, 2006
    Posts:
    740
    Wow, no comments? Anyone from UT, what type of array is Network.connections? Is it a list-based array? Can I use push, pop, and removeAt on it? Or is it just a basic array? I figure I might be able to work around the issue by removing the entry by hand and doing some housekeeping to keep the array in order.
     
  3. jeffcraighead

    jeffcraighead

    Joined:
    Nov 15, 2006
    Posts:
    740
    OK I submitted this as a bug since no one knows. :D Case 23109.
     
  4. jeffcraighead

    jeffcraighead

    Joined:
    Nov 15, 2006
    Posts:
    740
    Larus confirmed that this is the expected behavior and that the entry is removed from the list in the next Update. The reconnection issue I was having is related to my RPC post.