* Fix [pub] fix issue
@@ -305,11 +305,13 @@ encode_pub_message(nng_msg *dest_msg, const nano_work *work,
uint8_t tmp[4] = { 0 };
uint32_t arr_len = 0;
int append_res = 0;
- uint8_t proto;
+ uint8_t proto = 0;
uint32_t buf;
+ properties_type prop_type;
+ if (work->cparam) {
proto = conn_param_get_protover(work->cparam);
- properties_type prop_type;
+ }
debug_msg("start encode message");
