Fix busy loop when message times out.