when calling writeRow around a million times in a loop I get "MaxListenersExceededWarning: Possible EventEmitter memory leak detected" warning message, because when waiting for 'drain' the code is not removing the 'error' listener it attaches.
This change just removes the attached 'error' listener and avoids the warning, functionality stays the same.
when calling writeRow around a million times in a loop I get "MaxListenersExceededWarning: Possible EventEmitter memory leak detected" warning message, because when waiting for 'drain' the code is not removing the 'error' listener it attaches.
This change just removes the attached 'error' listener and avoids the warning, functionality stays the same.