Closed ogis-fujiwara closed 5 years ago
Original implementation has a possibility that some resources has not been closed when done()
called. This changes make sure to ensure all 4 resources closed before done()
called.
I pushed wrong code by my mistake, so I close the PR. I will create the new PR soon. I can force update my PR but according to CONTRIBUTION.md, I understand that I shouldn't do that.
No force push on master, here you can do whatever you want.
Il giorno ven 14 set 2018 alle 07:35 Masaaki Fujiwara < notifications@github.com> ha scritto:
I pushed wrong code by my mistake, so I close the PR. I will create the new PR soon. I can force update my PR but according to CONTRIBUTION.md https://github.com/mqttjs/MQTT.js/blob/master/CONTRIBUTING.md, I understand that I shouldn't do that.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/mcollina/mqtt-level-store/pull/13#issuecomment-421236282, or mute the thread https://github.com/notifications/unsubscribe-auth/AADL43tev2KzMwWSlJjNDJZkWN3h5sBGks5ua0AagaJpZM4WmcBP .
I rewrote it to close resources by parallelly.
I've pushed above changes.
Thank you very much for merging.
Call
close()
method of each resources by callback style becauseclose()
method ofincoming
,outgoing
,_sublevel
,_level
can take callback function as a parameter.Outcome: This fix guarantees the sequence of resource closing.