8000 change msg var scope · syk-coder/rabbitmq-tutorials@6f6be60 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6f6be60

Browse files
committed
change msg var scope
1 parent bf939e3 commit 6f6be60

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

javascript-nodejs/src/emit_log.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ function createChannel(conn) {
1313
function logMessage(ch) {
1414
var ex = 'logs';
1515
var ok = ch.assertExchange(ex, 'fanout', {durable: false})
16-
var msg = process.argv.slice(2).join(' ') || 'Hello World!';
1716

1817
return ok.then(function() {
18+
var msg = process.argv.slice(2).join(' ') || 'Hello World!';
19+
1920
ch.publish(ex, '', new Buffer(msg));
2021
console.log(" [x] Sent '%s'", msg);
2122
return ch.close();

0 commit comments

Comments
 (0)
0