mixpanel-node
mixpanel-node copied to clipboard
close(): for wait until tcp connection is finished:
I think we need to be sure to sent. Yeah we can use callback and we can promisify that callback but when use callback you should handle error and when you want to silent there is no option. There is two issue one of them silent error, other one wait tcp connection
We need function like below. /**
- A promise that resolves when all current events have been sent.
- @param timeout Maximum time in ms the client should wait.
*/
export declare function close(timeout?: number): Promise
;