when clustered, there are chances the a mqtt client process get killed (e.g. holding the channel registeration lock for too long), if the channel data inserts happen before casting out the message for channel process monitoring, there is a chance for the stale message left in the ets tables indefinitely. this commit changes the order of the non-atomic operations: it casts out the monitor request message before inserting channel data.
371 B
371 B
Fix a race-condition in channel info registration.
Prior to this fix, when system is under heavy load, it might happen that a client is disconnected (or has its session expired) but still can be found in the clients page in dashboard. One of the possible reasons is a race condition fixed in this PR: the connection is killed in the middle of channel data registration.