Closed gustavnikolaj closed 8 years ago
cc @papandreou
Thank you for reporting this and sorry for the long wait! This will be in the next release — merged @mwoc's PR and added a few tests to ensure they catch the sync case should someone refactor the code. ;)
Would you mind giving it a test, @gustavnikolaj, to confirm it all works as expected? You can install from this repo directly. I'll then release a new version. Thanks!
I would love to, but I can't until next week. I'm on vacation at the moment (without a laptop) :-) I'll get back to you as soon as possible.
Den mandag den 21. marts 2016 skrev Andri Möll notifications@github.com:
Would you mind giving it a test, @gustavnikolaj https://github.com/gustavnikolaj, to confirm it all works as expected? You can install from this repo directly. I'll then release a new version. Thanks!
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/moll/node-mitm/issues/22#issuecomment-199263330
@moll I can confirm that it's fixed when using the current tip of the master branch :-) :+1:
I would expect the following code, to output:
but it outputs:
I think it's very unexpected that
write
calls it callback synchronously. That is not how it usually works... When working with sockets, at least a tick would go by, before the callback was processed :-)