Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: add timeout #17

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Feat: add timeout #17

wants to merge 7 commits into from

Conversation

parthpnx
Copy link
Contributor

@parthpnx parthpnx commented Jul 17, 2024

Overview

Adding a timeout to skprmail avoidingfor unnecessarily long wait times with no errors or closures

Implementation

There was a context created and passed to both the ses and the default method. The ses method automatically handles the timeout via the context whereas we've implemented a goroutine to check for context timeout and close the application.

How to Test

Setup a mail server using smtp-go (https://github.com/emersion/go-smtp/blob/master/cmd/smtp-debug-server/main.go) package and add sleep at /server.go:211 This will ensure that the smtp server is available but will not respond to a connection dial leading our skprmail to be hung until the timeout is hit.

What is the rollout plan?

Merge and rollout

Does this change need a blog post?

Maybe a blog pose around contexts and timeouts

Link to Tickets

parthpnx added 2 commits July 25, 2024 08:14
- adds smtp debug server binary for testing timeout
- update documentation for testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants