Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.4
-
None
Description
I tried this:
1. Setup a broker using tcp-transport on one machine
2. Start a client using reliable transport and a client id on another machine (same LAN)
3. Pull the network plug on the client
- Client connection is terminated on the client side
- Broker doesn't notice
4. Plug the client back into the network - Reliable connection reconnects
- Broker throws InvalideClientIDException
5. Send a message to the Broker - Client disconnect is detected by the broker and client is removed
6. Reconnect client - Works now
Possible solutions from the top of my head:
1. When connecting with duplicate client ids, kick the existing client out (could lead to pseudo-race conditions if clients are incorrectly configured to use duplicate ids and reliable is enabled)
2. Do an explicit, syncrhonized keepalive packet send on the existing connection when a duplicate client connects, if the existing client is down, kick it and allow the new client to connect, otherwise do as normal
Number 2 is probably best and I'll implement it if you agree that this is a reasonable solution.