Skip to content

Commit

Permalink
Fix all MQTT protocol settings
Browse files Browse the repository at this point in the history
  • Loading branch information
twose committed May 21, 2020
1 parent d5a1cb5 commit 2ae8eb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion swoole_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ void php_swoole_client_check_setting(swClient *cli, zval *zset)
{
cli->open_length_check = zval_is_true(ztmp);
cli->protocol.package_length_size = SW_MQTT_MIN_LENGTH;
cli->protocol.package_length_offset = 0;
cli->protocol.package_length_offset = 1;
cli->protocol.package_body_offset = 0;
cli->protocol.get_package_length = swMqtt_get_package_length;
}
Expand Down
2 changes: 1 addition & 1 deletion swoole_socket_coro.cc
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ SW_API bool php_swoole_socket_set_protocol(Socket *sock, zval *zset)
{
sock->open_length_check = zval_is_true(ztmp);
sock->protocol.package_length_size = SW_MQTT_MIN_LENGTH;
sock->protocol.package_length_offset = 0;
sock->protocol.package_length_offset = 1;
sock->protocol.package_body_offset = 0;
sock->protocol.get_package_length = swMqtt_get_package_length;
}
Expand Down

0 comments on commit 2ae8eb3

Please sign in to comment.