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

fasthttputil: add errInmemoryListenerClosed #678

Merged
merged 4 commits into from
Oct 22, 2019
Merged

fasthttputil: add errInmemoryListenerClosed #678

merged 4 commits into from
Oct 22, 2019

Conversation

zhangyunhao116
Copy link
Contributor

@zhangyunhao116 zhangyunhao116 commented Oct 21, 2019

There are three identical errors in inmemory_listener.go, maybe we could use errInmemoryListenerClosed to replace them.

@zhangyunhao116 zhangyunhao116 changed the title fasthttputil/inmemory_listener: add errInmemoryListenerClosed fasthttputil: add errInmemoryListenerClosed Oct 21, 2019
Copy link
Collaborator

@erikdubbelboer erikdubbelboer left a comment

Choose a reason for hiding this comment

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

Good plan! but lets also expose the type so people can check for it.

"net"
"sync"
)

var errInmemoryListenerClosed = errors.New("InmemoryListener is already closed: use of closed network connection")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
var errInmemoryListenerClosed = errors.New("InmemoryListener is already closed: use of closed network connection")
var ErrInmemoryListenerClosed = errors.New("InmemoryListener is already closed: use of closed network connection")

Lets expose the type so people can check for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, done!

@erikdubbelboer erikdubbelboer merged commit 18c619f into valyala:master Oct 22, 2019
@erikdubbelboer
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants