Skip to content

Commit

Permalink
fix: don't memorize first encode return
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-roland committed Dec 13, 2023
1 parent 2df748d commit ae0196c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/transport/raweth/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,7 @@ int8_t _z_raweth_send_n_msg(_z_session_t *zn, const _z_network_message_t *n_msg,
// Encode the frame header
_Z_RETURN_IF_ERR(_z_transport_message_encode(&ztm->_wbuf, &t_msg));
// Encode the network message
ret = _z_network_message_encode(&ztm->_wbuf, n_msg);
if (ret == _Z_RES_OK) {
if (_z_network_message_encode(&ztm->_wbuf, n_msg) == _Z_RES_OK) {
// Write the eth header
_Z_RETURN_IF_ERR(__unsafe_z_raweth_write_header(&ztm->_link, &ztm->_wbuf));
// Send the wbuf on the socket
Expand Down

0 comments on commit ae0196c

Please sign in to comment.