disconnect stream instead of crashing on invalid message