Skip to content

Commit 1f8ebb3

Browse files
committed
Fix typos
1 parent eaca11e commit 1f8ebb3

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

.github/workflows/tests-and-coverage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
runs-on: ubuntu-latest
66
steps:
77
- name: check out repository code
8-
uses: actions/checkout@v2
8+
uses: actions/checkout@v4
99

1010
- name: run luacheck
1111
run: sudo apt-get install -y lua-check && cd "${{ github.workspace }}" && ./tests/run-luacheck.sh -q

docs/modules/mqtt.client.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ <h3>Parameters:</h3>
437437
</li>
438438
<li><span class="parameter">callback</span>
439439
<span class="types"><span class="type">function</span></span>
440-
callback to call when publihsed message will be acknowledged
440+
callback to call when published message will be acknowledged
441441
(<em>optional</em>)
442442
</li>
443443
</li></ul>

examples/copas-example.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ local mqtt_ioloop = require("mqtt.ioloop")
66

77
local num_pings = 10 -- total number of ping-pongs
88
local timeout = 1 -- timeout between ping-pongs
9-
local suffix = tostring(math.random(1000000)) -- mqtt topic suffix to distinct simultaneous rinning of this script
9+
local suffix = tostring(math.random(1000000)) -- mqtt topic suffix to distinct simultaneous running of this script
1010

1111
-- NOTE: more about flespi tokens: https://flespi.com/kb/tokens-access-keys-to-flespi-platform
1212
local token = "stPwSVV73Eqw5LSv0iMXbc4EguS7JyuZR9lxU5uLxI5tiNM8ToTVqNpu85pFtJv9"

examples/openresty/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ There is a two ways to run MQTT client in openresty:
1111

1212
Started MQTT client is connecting, subscribing and waiting for incoming MQTT publications as you code it, without any magic asynchronous work.
1313

14-
**Caveats**: The keep_alive feature will not work as there is no way for MQTT client to break its receive() operation in keep_alive interval and send PINGREQ packet to MQTT broker to maintain connection. It may lead to disconnects from MQTT broker side in absense traffic in opened MQTT connection. After disconnecting from broker there is a way to reconnect using openresty's timer.
14+
**Caveats**: The keep_alive feature will not work as there is no way for MQTT client to break its receive() operation in keep_alive interval and send PINGREQ packet to MQTT broker to maintain connection. It may lead to disconnects from MQTT broker side in absence of traffic in opened MQTT connection. After disconnecting from broker there is a way to reconnect using openresty's timer.
1515

1616
# ioloop mode
1717

mqtt/client.lua

+4-4
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ function client_mt:__init(args)
206206
self._to_remove_handlers = {}
207207

208208
-- state
209-
self.first_connect = true -- contains true to perform one network connection attemt after client creation
209+
self.first_connect = true -- contains true to perform one network connection attempt after client creation
210210
self.send_time = 0 -- time of the last network send from client side
211211

212212
-- packet creation/parse functions according version
@@ -420,7 +420,7 @@ end
420420
-- @tparam[opt=false] boolean args.dup dup message publication flag
421421
-- @tparam[opt] table args.properties properties for publishing message
422422
-- @tparam[opt] table args.user_properties user properties for publishing message
423-
-- @tparam[opt] function args.callback callback to call when publihsed message will be acknowledged
423+
-- @tparam[opt] function args.callback callback to call when published message will be acknowledged
424424
-- @return true or packet id on success or false and error message on failure
425425
function client_mt:publish(args)
426426
-- fetch and validate args
@@ -718,8 +718,8 @@ function client_mt:open_connection()
718718
-- create connection table
719719
local conn = {
720720
uri = args.uri,
721-
wait_for_pubrec = {}, -- a table with packet_id of parially acknowledged sent packets in QoS 2 exchange process
722-
wait_for_pubrel = {}, -- a table with packet_id of parially acknowledged received packets in QoS 2 exchange process
721+
wait_for_pubrec = {}, -- a table with packet_id of partially acknowledged sent packets in QoS 2 exchange process
722+
wait_for_pubrel = {}, -- a table with packet_id of partially acknowledged received packets in QoS 2 exchange process
723723
}
724724
client_mt._parse_uri(args, conn)
725725
client_mt._apply_secure(args, conn)

mqtt/protocol.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ combined_packet_mt.__index = function(_, key)
476476
end
477477

478478
--- Combine several data parts into one
479-
-- @tparam combined_packet_mt/string ... any amout of strings of combined_packet_mt tables to combine into one packet
479+
-- @tparam combined_packet_mt/string ... any amount of strings of combined_packet_mt tables to combine into one packet
480480
-- @treturn combined_packet_mt table suitable to append packet parts or to stringify it into raw packet bytes
481481
function protocol.combine(...)
482482
return setmetatable({...}, combined_packet_mt)

mqtt/protocol4.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ function protocol4.parse_packet(read_func)
320320
if not ptype then
321321
return false, flags
322322
end
323-
-- parse readed data according type in fixed header
323+
-- parse read data according type in fixed header
324324
if ptype == packet_type.CONNECT then
325325
return parse_packet_connect_input(input, const_v311)
326326
elseif ptype == packet_type.CONNACK then

mqtt/protocol5.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ function protocol5.parse_packet(read_func)
811811
local byte1, byte2, err, rc, ok, packet, topic, packet_id
812812
local read_data = input.read_func
813813

814-
-- parse readed data according type in fixed header
814+
-- parse read data according type in fixed header
815815
if ptype == packet_type.CONNACK then
816816
-- DOC: 3.2 CONNACK – Connect acknowledgement
817817
if input.available < 3 then

tests/spec/mqtt-client.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,8 @@ describe("no_local flag for subscription: ", function()
505505
assert.are.equal(1, s2.published, "only one publish")
506506
assert.are.same({"stop"}, s1.messages, "only one message")
507507
assert.are.same({"message", "stop"}, s2.messages, "should be two messages")
508-
assert.are.same({}, s1.errors, "errors occured with client 1")
509-
assert.are.same({}, s2.errors, "errors occured with client 2")
508+
assert.are.same({}, s1.errors, "errors occurred with client 1")
509+
assert.are.same({}, s2.errors, "errors occurred with client 2")
510510
end)
511511
end)
512512

0 commit comments

Comments
 (0)