Add some comments

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2018-12-11 07:12:33 -08:00
parent 4b70cdfc89
commit 4719c618b3
2 changed files with 4 additions and 1 deletions

View File

@@ -2178,7 +2178,7 @@ func (c *client) checkForImportServices(acc *Account, msg []byte) {
nrr = c.newServiceReply()
rm.acc.addImplicitServiceImport(acc, string(nrr), string(c.pa.reply), true, nil)
// If this is a client connection and we are in
// gateway mode, we need to send RS+ to cluster
// gateway mode, we need to send RS+ to local cluster
// and possibly to inbound GW connections for
// which we are in interest-only mode.
if c.kind == CLIENT && c.srv.gateway.enabled {

View File

@@ -2108,6 +2108,9 @@ func (c *client) processInboundGatewayMsg(msg []byte) {
// Check to see if we need to map/route to another account.
if acc.imports.services != nil && isServiceReply(c.pa.subject) {
// We are handling an response to a request that we mapped
// via service imports, so if we are here we are the
// origin server
c.checkForImportServices(acc, msg)
}