EC-Nordbund / denomailer

A SMTP-Client implementation for deno (to send mails!)
https://deno.land/x/denomailer
MIT License
50 stars 16 forks source link

cleanup job can put int deadlock when NOOP is not working #70

Open lucsoft opened 1 year ago

lucsoft commented 1 year ago

Describe the bug

Im connecting to a remote network (so it could be a package drop or something random fuzz). if it doesn't find the response for the cleanup and instead of just a timeout, it goes full ham and puts the cpu to 100% forever

To Reproduce

Connect to a remote smtp and have not perfect network stability (random package drops)

Expected behavior

A clear and concise description of what you expected to happen.

Logs

Provide the output of deno --version

deno 1.31.1 (release, x86_64-apple-darwin)
v8 11.0.226.13
typescript 4.9.4

Provide the output of your code snippet (with debug.log set to true see hhttps://github.com/EC-Nordbund/denomailer#options )

Put log here
lucsoft commented 1 year ago

After some more digging the NOOP command fails as the smtp server doesn't have a NOOP instruction could this be the issue?

Evertt commented 1 year ago

Yeah it seems to me, that there should be some other kind of break in this while loop?

https://github.com/EC-Nordbund/denomailer/blob/main/client/basic/client.ts#L380

Because even when using a worker, the timeout option doesn't work if the client is in an endless while loop.