downstream: shallow copy message in SendMessage instead of deep copy
This commit is contained in:
parent
fbcda7b963
commit
d5108f3994
|
@ -526,7 +526,8 @@ func (dc *downstreamConn) SendMessage(ctx context.Context, msg *irc.Message) {
|
||||||
}
|
}
|
||||||
if msg.Prefix != nil && msg.Prefix.Name == "*" {
|
if msg.Prefix != nil && msg.Prefix.Name == "*" {
|
||||||
// We use "*" as a sentinel value to simplify upstream message handling
|
// We use "*" as a sentinel value to simplify upstream message handling
|
||||||
msg = msg.Copy()
|
msgCopy := *msg
|
||||||
|
msg = &msgCopy
|
||||||
msg.Prefix = nil
|
msg.Prefix = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue