m4nuC / async-busboy

Promise based multipart form parser for KoaJS
MIT License
167 stars 58 forks source link

Cleanup function will not remove custom onFile function, memory leak #37

Closed Bodasia closed 4 years ago

Bodasia commented 4 years ago

async-busyboy doesn't unsubscribe from custom onFile function on error.

Bodasia commented 4 years ago

add listener https://github.com/m4nuC/async-busboy/blob/4f2776b5783c79750fe9e21c4b5fb49afcf75e2a/index.js#L25 and here listener are not removed https://github.com/m4nuC/async-busboy/blob/4f2776b5783c79750fe9e21c4b5fb49afcf75e2a/index.js#L78

Bodasia commented 4 years ago

@m4nuC, here solution https://github.com/m4nuC/async-busboy/pull/38

Bodasia commented 4 years ago

@fireyy,maybe you

m4nuC commented 4 years ago

Thanks @Bodasia. I've pushed the fix on version 1.0.0