Is there a way to turn off a hit test when a layer is removed from a view?
Example: I have a parcel layer that parcels get highlighted on pointer-move event, but when I remove the layer the hitTest continues to run and I receive the connection closed error. So I am assuming that the hitTest is still running and the error is telling me there is no layer to hitTest.
Hard to tell what is going on from the description alone; do you have a very simple CodePen showing the issue? Hopefully being able to experience the issue will allow the community to suggest solutions or workarounds.