-
Notifications
You must be signed in to change notification settings - Fork 5.5k
listener: clean up accept filter before creating connection #8922
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
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -97,8 +97,10 @@ MockUdpListenerCallbacks::~MockUdpListenerCallbacks() = default; | |
| MockDrainDecision::MockDrainDecision() = default; | ||
| MockDrainDecision::~MockDrainDecision() = default; | ||
|
|
||
| MockListenerFilter::MockListenerFilter() = default; | ||
| MockListenerFilter::~MockListenerFilter() = default; | ||
| MockListenerFilter::MockListenerFilter() { | ||
| // ON_CALL(*this, die_()).WillByDefault(testing::Invoke([](){})); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't really know why ON_CALL + NiceMock reports uninterested call.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't work in the destructor of a mock. We do this all over the place. Please delete this comment.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sad... |
||
| } | ||
| MockListenerFilter::~MockListenerFilter() { die_(); } | ||
|
|
||
| MockListenerFilterCallbacks::MockListenerFilterCallbacks() { | ||
| ON_CALL(*this, socket()).WillByDefault(ReturnRef(socket_)); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -164,6 +164,7 @@ class MockListenerFilter : public ListenerFilter { | |
| MockListenerFilter(); | ||
| ~MockListenerFilter() override; | ||
|
|
||
| MOCK_METHOD0(die_, void()); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/die_/destroy which is what we typically name this method
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updating... |
||
| MOCK_METHOD1(onAccept, Network::FilterStatus(ListenerFilterCallbacks&)); | ||
| }; | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.