One of the ways I recall handling this type of recursive callback process in regular programming is to have a variable set when you start processing and then test for that for future calls.
So, something like the following may help, if you can't think of anything wowapi wise.
Lua Code:
-- Addon wide variable ( at top of file )
local isProcessing = false
You might also need to reset this on a reload
And then in your event code
Lua Code:
elseif event == "PLAYER_EQUIPMENT_CHANGED" then
-- return out immediately if in the middle of an update
if isProcessing then return end
-- new update, so set processing flag
isProcessing = true
--------------------------------------------
-- Rest of your code after this point
---------------------------------------------
-- finished processing so reset processing flag
isProcessing = false
end