-
Notifications
You must be signed in to change notification settings - Fork 17
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
Added option for backend to have a vhost override #103
base: main
Are you sure you want to change the base?
Changes from all 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 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -220,7 +220,11 @@ void Connector::receive(const Method &method, FlowType direction) | |||||||||||
LOG_TRACE << "Server Tune: " << d_receivedTune; | ||||||||||||
|
||||||||||||
sendResponse(d_tuneOk, false); | ||||||||||||
sendResponse(d_open, false); | ||||||||||||
|
||||||||||||
methods::Open openCopy = d_open; | ||||||||||||
openCopy.setVirtualHost(d_sessionState_p->getBackendVirtualHost()); | ||||||||||||
sendResponse(openCopy, false); | ||||||||||||
Comment on lines
+224
to
+226
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. The only property which is encoded/decoded in amqpprox on Open is the vhost so copying the inbound open is a little pointless now, I feel it's neater to keep the Open object immutable and add a constructor which takes a vhost string. I think we could go with something like this, and ditch the
Suggested change
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 wasnt sure what else used |
||||||||||||
|
||||||||||||
d_state = State::OPEN_SENT; | ||||||||||||
} break; | ||||||||||||
case State::OPEN_SENT: { | ||||||||||||
|
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.
I suggest we use
std::optional<std::string>
here - mainly for the benefit of indicating that it may not be set.