Closing connections when decoding of message fails #3241

Force connection to be closed when a corrupt serialized message is received.