Skip to content

Commit 0d5a474

Browse files
committed
remove loop
1 parent fa2cb01 commit 0d5a474

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

index.coffee

+3-5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ exports.handler = (event, context) ->
88
client = mqtt.connect("mqtt://test.mosquitto.org:1883")
99
console.log "after mqtt.connect()"
1010

11-
for i in [1..1000]
12-
console.log "before client.publish() ", i
13-
client.publish event.topic, event.value,
14-
retain: (event.retain? and event.retain)
15-
console.log "after client.publish()", i
11+
client.publish event.topic, event.value,
12+
retain: (event.retain? and event.retain)
13+
console.log "after client.publish()"
1614

1715
client.end()
1816
console.log "after cleint.end()"

0 commit comments

Comments
 (0)