I can understand both sides.
It’s understandable that Danny would be frustrated after losing the game on a poor decision and being denied the chance to salvage the situation from what probably felt like a perfectly good counter-ruck (but I think there was a genuine infringement earlier in the play).
But regardless of what he said to Carley, talking back to the ref risks a card of some colour, and the ref is entitled to explain his reasoning to the affected player.
I don’t think Carley handled the end of the game well - both the penalty against Andre and the one against Luke were incorrectly awarded as far as I can see (Andre was holding on - but Quins were impeded from clearing out because the tackler was on the wrong side), and had lost the confidence of the Quins players. But that doesn’t excuse Danny’s response, and I think Carley was actually quite generous in the number of chances he gave him to rectify the situation.