mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Send LS- without origin to route
When cluster origin code was added, a server may send LS+ with an origin cluster name in the protocol. Parsing code from a ROUTER connection was adjusted to understand this LS+ protocol. However, the server was also sending an LS- with origin but the parsing code was not able to understand that. When the unsub was for a queue subscription, this would cause the parser to error out and close the route connection. This PR sends an LS- without the origin in this case (so that tracing makes sense in term of LS+/LS- sent to a route). The receiving side then traces appropriate LS- but processes as a normal RS-. Resolves #1751 Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
@@ -733,7 +733,12 @@ func (c *client) parse(buf []byte) error {
|
||||
err = c.processUnsub(arg)
|
||||
case ROUTER:
|
||||
if trace && c.srv != nil {
|
||||
c.traceInOp("RS-", arg)
|
||||
switch c.op {
|
||||
case 'R', 'r':
|
||||
c.traceInOp("RS-", arg)
|
||||
case 'L', 'l':
|
||||
c.traceInOp("LS-", arg)
|
||||
}
|
||||
}
|
||||
err = c.processRemoteUnsub(arg)
|
||||
case GATEWAY:
|
||||
|
||||
Reference in New Issue
Block a user