We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fbbb91 commit 54b3eeeCopy full SHA for 54b3eee
1 file changed
src/Consumer.js
@@ -143,6 +143,7 @@ class Consumer extends stream.Readable {
143
consumerData.write(consumerState, 4, consumerState.length, 'utf-8');
144
var tmpFile = this.fileName + '.' + this.position;
145
this.persisting = null;
146
+ /* istanbul ignore if */
147
if (fs.existsSync(tmpFile)) {
148
throw new Error(`Trying to update consumer ${this.name} concurrently. Keep each single consumer within a single process.`);
149
}
@@ -152,6 +153,7 @@ class Consumer extends stream.Readable {
152
153
fs.renameSync(tmpFile, this.fileName);
154
this.emit('persisted');
155
} catch (e) {
156
+ /* istanbul ignore next */
157
fs.unlinkSync(tmpFile);
158
159
});
0 commit comments