mirror of
https://github.com/minio/minio.git
synced 2024-12-25 14:45:54 -05: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 New Issue
Block a user