Small refactor of mediator for clearer code and clearer error message.

For clarity, I wanted to display the amount of ms virgilio waited in the TimeoutError-message. To achieve this I had to change the code the bit, which in the end was probably for the best.

Functionally, nothing changes.