glynnbird commented on code in PR #314: URL: https://github.com/apache/couchdb-nano/pull/314#discussion_r1827527260
########## lib/nano.js: ########## @@ -238,7 +278,9 @@ module.exports = exports = function dbScope (cfg) { log({ err: 'couch', body: message, headers: responseHeaders }) - stream.emit('error', error) + setTimeout(() => { Review Comment: It think its to ensure the the caller who gets the returned stream actually is in possesion of the returned value before we emit and error event on to it. Without a delay/whatever the error event falls into the void. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org