-
Notifications
You must be signed in to change notification settings - Fork 19
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: Implement Close. #24
Conversation
session.go
Outdated
@@ -210,8 +210,7 @@ func (m *milterSession) Process(msg *Message) (Response, error) { | |||
|
|||
case CodeQuit: | |||
// client requested session close | |||
return nil, errCloseSession | |||
|
|||
return m.backend.Close(newModifier(m)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before errCloseSession
was returned, now it's never returned
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about this mistake.
Quote from sendmail milter doc: "Since the connection is already closing, the return value is currently ignored." So, How about not return any value in Close()
?
Close(m *Modifier)
Then we can do this in Process()
:
case CodeQuit:
m.backend.Close(newModifier(m))
return nil, errCloseSession
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated PR. Please help review. @emersion
Dear @emersion, could you help review again? |
1 similar comment
Dear @emersion, could you help review again? |
|
This PR implements
Close()
method for theMilter
interface.fixes #20