Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/handle_publish.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ int handle__publish(struct mosquitto *mosq)
if(mosq->protocol == mosq_p_mqtt5){
if(mosq->msgs_in.inflight_quota == 0){
message__cleanup(&message);
/* FIXME - should send a DISCONNECT here */
return MOSQ_ERR_PROTOCOL;
send__disconnect(mosq, MQTT_RC_RECEIVE_MAXIMUM_EXCEEDED, NULL );
return MOSQ_ERR_RECEIVE_MAXIMUM_EXCEEDED;
}
}

Expand Down
6 changes: 0 additions & 6 deletions src/handle_publish.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,8 @@ int handle__accepted_publish(struct mosquitto *context, struct mosquitto__base_m
if(!cmsg_stored){
if(base_msg->data.qos > 0 && context->msgs_in.inflight_quota == 0){
log__printf(NULL, MOSQ_LOG_WARNING, "Client %s has exceeded its receive-maximum quota. This behaviour must be fixed on the client.", context->id);
#if 0
/* Badly behaving clients like on the esp32 fall foul of this
* check, so report it for now but don't disconnect, to give chance
* for the bad behaviour to be fixed. */
/* Client isn't allowed any more incoming messages, so fail early */
db__msg_store_free(base_msg);
return MOSQ_ERR_RECEIVE_MAXIMUM_EXCEEDED;
#endif
}

if(base_msg->data.qos == 0
Expand Down
2 changes: 1 addition & 1 deletion test/broker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ endif()
set(EXCLUDE_LIST
01-connect-uname-password-success-no-tls
03-publish-qos1-queued-bytes
03-publish-qos2-max-inflight-exceeded
09-extended-auth-single2
# Not a test
06-bridge-clean-session-core
Expand Down Expand Up @@ -81,6 +80,7 @@ add_python_test(PY_TEST_NAMES ${PREFIX} 1 "03-publish-qos1-max-inflight-expire.p
add_python_test(PY_TEST_NAMES ${PREFIX} 1 "03-publish-qos1-max-inflight.py")
add_python_test(PY_TEST_NAMES ${PREFIX} 1 "03-publish-qos1-no-subscribers-v5.py")
add_python_test(PY_TEST_NAMES ${PREFIX} 1 "03-publish-qos1-retain-disabled.py")
add_python_test(PY_TEST_NAMES ${PREFIX} 1 "03-publish-qos2-max-inflight-exceeded.py")
add_python_test(PY_TEST_NAMES ${PREFIX} 1 "03-publish-qos2-max-inflight.py")
add_python_test(PY_TEST_NAMES ${PREFIX} 1 "03-publish-qos2-reuse-mid.py")
add_python_test(PY_TEST_NAMES ${PREFIX} 2 "04-retain-check-source-persist-diff-port.py")
Expand Down
2 changes: 1 addition & 1 deletion test/broker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ msg_sequence_test:
./03-publish-qos1-max-inflight-expire.py
./03-publish-qos1-no-subscribers-v5.py
./03-publish-qos1-retain-disabled.py
#./03-publish-qos2-max-inflight-exceeded.py
./03-publish-qos2-max-inflight-exceeded.py
./03-publish-qos2-max-inflight.py
./03-publish-qos2-reuse-mid.py

Expand Down
2 changes: 1 addition & 1 deletion test/broker/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
(1, './03-publish-qos1-max-inflight.py'),
(1, './03-publish-qos1-no-subscribers-v5.py'),
(1, './03-publish-qos1-retain-disabled.py'),
#(1, './03-publish-qos2-max-inflight-exceeded.py'),
(1, './03-publish-qos2-max-inflight-exceeded.py'),
(1, './03-publish-qos2-max-inflight.py'),
(1, './03-publish-qos2-reuse-mid.py'),

Expand Down