Changeset 739 in code for trunk/upstream.go
- Timestamp:
- Dec 2, 2021, 10:27:12 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/upstream.go
r738 r739 413 413 } 414 414 415 func (uc *upstreamConn) handleMessage( msg *irc.Message) error {415 func (uc *upstreamConn) handleMessage(ctx context.Context, msg *irc.Message) error { 416 416 var label string 417 417 if l, ok := msg.GetTag("label"); ok { … … 492 492 if ch != nil && msg.Command != "TAGMSG" { 493 493 if ch.Detached { 494 uc.handleDetachedMessage(c h, msg)494 uc.handleDetachedMessage(ctx, ch, msg) 495 495 } 496 496 … … 663 663 if dc, _ := uc.dequeueCommand("AUTHENTICATE"); dc != nil && dc.sasl != nil { 664 664 if msg.Command == irc.RPL_SASLSUCCESS { 665 uc.network.autoSaveSASLPlain(c ontext.TODO(), dc.sasl.plainUsername, dc.sasl.plainPassword)665 uc.network.autoSaveSASLPlain(ctx, dc.sasl.plainUsername, dc.sasl.plainPassword) 666 666 } 667 667 … … 685 685 return err 686 686 } 687 uc.network.autoSaveSASLPlain(c ontext.TODO(), account, password)687 uc.network.autoSaveSASLPlain(ctx, account, password) 688 688 } 689 689 … … 1716 1716 } 1717 1717 1718 func (uc *upstreamConn) handleDetachedMessage(c h *Channel, msg *irc.Message) {1718 func (uc *upstreamConn) handleDetachedMessage(ctx context.Context, ch *Channel, msg *irc.Message) { 1719 1719 if uc.network.detachedMessageNeedsRelay(ch, msg) { 1720 1720 uc.forEachDownstream(func(dc *downstreamConn) { … … 1724 1724 if ch.ReattachOn == FilterMessage || (ch.ReattachOn == FilterHighlight && uc.network.isHighlight(msg)) { 1725 1725 uc.network.attach(ch) 1726 if err := uc.srv.db.StoreChannel(c ontext.TODO(), uc.network.ID, ch); err != nil {1726 if err := uc.srv.db.StoreChannel(ctx, uc.network.ID, ch); err != nil { 1727 1727 uc.logger.Printf("failed to update channel %q: %v", ch.Name, err) 1728 1728 } … … 1915 1915 } 1916 1916 1917 if err := uc.handleMessage( msg); err != nil {1917 if err := uc.handleMessage(context.TODO(), msg); err != nil { 1918 1918 if _, ok := err.(registrationError); ok { 1919 1919 return err
Note:
See TracChangeset
for help on using the changeset viewer.