Skip to content

Add support for setting a connection deadline#339

Merged
antoniomika merged 1 commit intoantoniomika:mainfrom
carlfriedrich:add-deadline-support
Mar 10, 2025
Merged

Add support for setting a connection deadline#339
antoniomika merged 1 commit intoantoniomika:mainfrom
carlfriedrich:add-deadline-support

Conversation

@carlfriedrich
Copy link
Copy Markdown
Contributor

This is useful if you do not want to keep a tunnel open for an unlimited time and have Sish taking care of closing it automatically.

@carlfriedrich
Copy link
Copy Markdown
Contributor Author

FYI: I did not find a place in the docs where all the connection parameters are described, so I added the documentation to the cheatsheet section.

@antoniomika
Copy link
Copy Markdown
Owner

Hey @carlfriedrich

Thanks for the contribution! I'll review this more thoroughly in a bit.

At first glance, let's use a pointer to a time.Time value and use a check for it being nil instead of the zero check. Also maybe accept epoch?

Best,

This is useful if you do not want to keep a tunnel open for an unlimited
time and have Sish taking care of closing it automatically.
@carlfriedrich
Copy link
Copy Markdown
Contributor Author

@antoniomika Thanks for your quick reply again! Good idea with the pointer and the epoch value, I added that. Also refactored the parsing code into a dedicated function, that makes the code more readable IMO.

Looking forward to your detailed review.

Copy link
Copy Markdown
Owner

@antoniomika antoniomika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm 👍

@antoniomika antoniomika merged commit 3ed5546 into antoniomika:main Mar 10, 2025
1 of 2 checks passed
@antoniomika
Copy link
Copy Markdown
Owner

Thanks again @carlfriedrich! Keep the good ideas coming :)

@carlfriedrich carlfriedrich deleted the add-deadline-support branch March 10, 2025 16:13
@carlfriedrich
Copy link
Copy Markdown
Contributor Author

@antoniomika Great, thanks again for maintaining this great project so reliably! 😎

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