Fixes bug 938216 - Timeout cannot accept messages.
Merge pull request #1672 from AdrianGaudebert/938216-timeout-middleware

Fixes bug 938216 - Timeout cannot accept messages.