We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5f04849 + 30f5d55 commit 190c143Copy full SHA for 190c143
connection.go
@@ -601,13 +601,17 @@ func (c *Connection) dispatch0(f frame) {
601
602
func (c *Connection) dispatchN(f frame) {
603
c.m.Lock()
604
- channel := c.channels[f.channel()]
605
- updateChannel(f, channel)
+ channel, ok := c.channels[f.channel()]
+ if ok {
606
+ updateChannel(f, channel)
607
+ } else {
608
+ Logger.Printf("[debug] dropping frame, channel %d does not exist", f.channel())
609
+ }
610
c.m.Unlock()
611
612
// Note: this could result in concurrent dispatch depending on
613
// how channels are managed in an application
- if channel != nil {
614
615
channel.recv(channel, f)
616
} else {
617
c.dispatchClosed(f)
0 commit comments