mirror of
https://github.com/minio/minio
synced 2024-09-06 00:37:25 +00:00
Always remove subroute when queuing message on the connection. (#18550)
This commit is contained in:
parent
bea0b050cd
commit
0bb81f2e9c
|
@ -544,7 +544,10 @@ func (c *Connection) send(msg []byte) error {
|
|||
// queueMsg queues a message, with an optional payload.
|
||||
// sender should not reference msg.Payload
|
||||
func (c *Connection) queueMsg(msg message, payload sender) error {
|
||||
msg.Flags |= c.baseFlags
|
||||
// Add baseflags.
|
||||
msg.Flags.Set(c.baseFlags)
|
||||
// This cannot encode subroute.
|
||||
msg.Flags.Clear(FlagSubroute)
|
||||
if payload != nil {
|
||||
if cap(msg.Payload) < payload.Msgsize() {
|
||||
old := msg.Payload
|
||||
|
|
|
@ -186,6 +186,16 @@ func (f Flags) String() string {
|
|||
return "[" + strings.Join(res, ",") + "]"
|
||||
}
|
||||
|
||||
// Set one or more flags on f.
|
||||
func (f *Flags) Set(flags Flags) {
|
||||
*f |= flags
|
||||
}
|
||||
|
||||
// Clear one or more flags on f.
|
||||
func (f *Flags) Clear(flags Flags) {
|
||||
*f &^= flags
|
||||
}
|
||||
|
||||
// parse an incoming message.
|
||||
func (m *message) parse(b []byte) (*subHandlerID, []byte, error) {
|
||||
var sub *subHandlerID
|
||||
|
|
Loading…
Reference in a new issue