Skip to content

Commit

Permalink
Merge pull request #18 from cloudstruct/feature/muxer-fix-unknown-pro…
Browse files Browse the repository at this point in the history
…tocol

Fix handling for unknown protocol in muxer
  • Loading branch information
agaffney authored Feb 17, 2022
2 parents 0506667 + ae2578f commit bae132e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions muxer/muxer.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ func (m *Muxer) readLoop() {
if recvChan == nil {
m.ErrorChan <- fmt.Errorf("received message for unknown protocol ID %d", msg.GetProtocolId())
}
} else {
m.protocolReceivers[msg.GetProtocolId()] <- msg
}
if recvChan != nil {
recvChan <- msg
}
}
}

0 comments on commit bae132e

Please sign in to comment.