In this particular sentence, it would be possible to add the comma, but it wouldn't change the meaning. It's probably a bad idea anyway, because a comma "slows down" the reading - so it would conflict with the sense of "rushed speech" that we get from the context (and the hyphens!)
But in a slightly different sentence:
We were discussing what to say to Dumbledore, when he walked in the room.
with the comma, there's a pause which tells us how to interpret the "when" clause.
Dumbledore walked in the room just at the time we were discussing what we would say to him.
We were discussing what to say to Dumbledore when he walked in the room.
without the comma, we assume "when" applies to what came before, not what comes after.
We expected Dumbledore to walk in soon; we were discussing what we would say if/when he did.
So a comma before "when" can make a difference. It just so happens it doesn't in OP's example.