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

Add Noop method to the Session interface #182

Closed
wants to merge 1 commit into from

Conversation

kayrus
Copy link
Contributor

@kayrus kayrus commented Apr 28, 2022

And add error pointer to the Reset method

Noop() is supposed to be used to test the connection state

And add error pointer to the Reset method
@emersion
Copy link
Owner

I'm not sure I understand:

  • This PR just adds a new method but never calls it.
  • NOOP always make the server reply with OK immediately. The backend doesn't need to be involved in this.

@kayrus
Copy link
Contributor Author

kayrus commented Apr 29, 2022

This PR just adds a new method but never calls it.

it is a new method like others. it is not necessary to call it inside this package. the PR just exposes it in Sessions interface.

NOOP always make the server reply with OK immediately. The backend doesn't need to be involved in this

I don't understand the question. It is for the client.

@emersion
Copy link
Owner

Session is a type used by servers only.

@kayrus
Copy link
Contributor Author

kayrus commented Apr 29, 2022

It is used by proxy. Proxy is kinda client-server.

@emersion emersion closed this Apr 29, 2022
@emersion
Copy link
Owner

Sorry, I don't understand what you're trying to do, but I'm not going to merge this change, it doesn't make sense to me.

@kayrus
Copy link
Contributor Author

kayrus commented Apr 29, 2022

@emersion Your questions don't make sense :\ This PR just extends the session interface. Session interface is used in https://github.com/emersion/go-smtp-proxy. Each session represents a connection. In order to keep running long living connections I need to periodically execute NOOP command. If the NOOP fails, the connection needs to be reestablished.

@kayrus
Copy link
Contributor Author

kayrus commented Apr 29, 2022

@emersion I see you just archived the https://github.com/emersion/go-smtp-proxy repo. At least google cache shows that it was still active on 25th of April. Even though, I still would like to have a Noop method in upstream. I hope you can review the PR once again and merge it.

Repository owner locked as resolved and limited conversation to collaborators Apr 29, 2022
@emersion
Copy link
Owner

I don't have any more free time to spend on your issue.

@kayrus kayrus deleted the add-noop branch June 14, 2022 19:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants