Skip to content

Commit bae132e

Browse files
authored
Merge pull request #18 from cloudstruct/feature/muxer-fix-unknown-protocol
Fix handling for unknown protocol in muxer
2 parents 0506667 + ae2578f commit bae132e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

muxer/muxer.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ func (m *Muxer) readLoop() {
9191
if recvChan == nil {
9292
m.ErrorChan <- fmt.Errorf("received message for unknown protocol ID %d", msg.GetProtocolId())
9393
}
94-
} else {
95-
m.protocolReceivers[msg.GetProtocolId()] <- msg
94+
}
95+
if recvChan != nil {
96+
recvChan <- msg
9697
}
9798
}
9899
}

0 commit comments

Comments
 (0)