Break the decode loop if decoder raises an exception to give a chance to close the connection to a user handler

- Fixes: #1161