Skip to content

Commit

Permalink
Merge pull request #5 from payhereinc/refactor/remove-connack-timeout
Browse files Browse the repository at this point in the history
refactor: connack timeout error 이벤트 emit 코드를 제거
  • Loading branch information
minozzang508 authored Mar 17, 2024
2 parents f0e8a27 + 47643bb commit 8681a16
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,6 @@ export default class MqttClient extends TypedEventEmitter<MqttClientEventCallbac
this.log(
'!!connectTimeout hit!! Calling _cleanUp with force `true`',
)
this.emit('error', new Error('connack timeout'))
this._cleanUp(true)
}, this.options.connectTimeout)

Expand Down
12 changes: 0 additions & 12 deletions test/abstract_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3004,18 +3004,6 @@ export default function abstractTest(server, config, ports) {
}, 50)
})

it('should emit connack timeout error', function _test(t, done) {
const client = connect({
connectTimeout: 0,
reconnectPeriod: 5000,
})

client.on('error', (err) => {
assert.equal(err.message, 'connack timeout')
client.end(true, done)
})
})

it(
'should resend in-flight QoS 1 publish messages from the client',
{
Expand Down

0 comments on commit 8681a16

Please sign in to comment.