Further fix for large packets not being sent in a timely fashion.
This commit is contained in:
parent
c604cf8fd0
commit
fabdfcc060
@ -38,6 +38,11 @@ enum mosquitto_client_state mosquitto__get_state(struct mosquitto *mosq)
|
||||
return mosq_cs_new;
|
||||
}
|
||||
|
||||
int mux__add_out(struct mosquitto *mosq)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mux__remove_out(struct mosquitto *mosq)
|
||||
{
|
||||
return 0;
|
||||
|
@ -350,9 +350,7 @@ struct mosquitto {
|
||||
struct session_expiry_list *expiry_list_item;
|
||||
uint16_t remote_port;
|
||||
#endif
|
||||
#ifdef WITH_EPOLL
|
||||
uint32_t events;
|
||||
#endif
|
||||
};
|
||||
|
||||
#define STREMPTY(str) (str[0] == '\0')
|
||||
|
@ -164,7 +164,6 @@ int packet__queue(struct mosquitto *mosq, struct mosquitto__packet *packet)
|
||||
lws_callback_on_writable(mosq->wsi);
|
||||
return MOSQ_ERR_SUCCESS;
|
||||
}else{
|
||||
mux__add_out(mosq);
|
||||
return packet__write(mosq);
|
||||
}
|
||||
# else
|
||||
@ -216,6 +215,10 @@ int packet__write(struct mosquitto *mosq)
|
||||
if(!mosq) return MOSQ_ERR_INVAL;
|
||||
if(mosq->sock == INVALID_SOCKET) return MOSQ_ERR_NO_CONN;
|
||||
|
||||
#ifdef WITH_BROKER
|
||||
mux__add_out(mosq);
|
||||
#endif
|
||||
|
||||
pthread_mutex_lock(&mosq->current_out_packet_mutex);
|
||||
pthread_mutex_lock(&mosq->out_packet_mutex);
|
||||
if(mosq->out_packet && !mosq->current_out_packet){
|
||||
|
Loading…
Reference in New Issue
Block a user