Skip to content

Commit c37da28

Browse files
authored
Merge pull request #23 from msgflo/fix-mqtt-falsy
mqtt: Fix falsy messages not being sent
2 parents e02f7b3 + a2fc882 commit c37da28

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/mqtt.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class Client extends interfaces.MessagingClient
105105
handlers = @subscribers[topic]
106106

107107
debug 'message', handlers.length, msg != null
108-
return if not msg or not handlers
108+
return if not handlers
109109
out =
110110
data: msg
111111
mqtt: message

src/routing.coffee

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class Binder
6060
binding = @bindings[id]
6161
return callback new Error "Binding does not exist" if not binding
6262
binding.enabled = false
63+
delete @bindings[id]
6364
#FIXME: add an unsubscribeQueue to Client/transport, and use that
6465
return callback null
6566

0 commit comments

Comments
 (0)