dorita980-node18 – Diff between revs 1 and 2
?pathlinks?
Rev 1 | Rev 2 | |||
---|---|---|---|---|
Line 24... | Line 24... | |||
24 | protocolVersion: 4, |
24 | protocolVersion: 4, |
|
25 | ciphers: process.env.ROBOT_CIPHERS || 'AES128-SHA256', |
25 | ciphers: process.env.ROBOT_CIPHERS || 'AES128-SHA256', |
|
26 | clean: false, |
26 | clean: false, |
|
27 | username: user, |
27 | username: user, |
|
28 | password: password, |
28 | password: password, |
|
- | 29 | reconnectPeriod: 10000, |
||
29 | secureOptions: constants.SSL_OP_LEGACY_SERVER_CONNECT |
30 | secureOptions: constants.SSL_OP_LEGACY_SERVER_CONNECT |
|
30 | }; |
31 | }; |
|
Line 31... | Line 32... | |||
31 | |
32 | |
|
Line 32... | Line 33... | |||
32 | const client = mqtt.connect(url, options); |
33 | const client = mqtt.connect(url, options); |
|
33 | |
34 | |
|
34 | client.on('error', function (e) { |
35 | client.on('error', function (e) { |
|
Line 35... | Line 36... | |||
35 | throw e; |
36 | console.log(`Cannot connect to Roomba: ${e}`); |
|
36 | }); |
37 | }); |
|
37 | |
38 | |