rpc - Close connection if we have an error reading the header or body