Skip to content

Commit

Permalink
review: fix bug in api.Multicast.Add
Browse files Browse the repository at this point in the history
We need to check that the added `io.Writer`
is not nil.

Signed-off-by: Andreas Auernhammer <[email protected]>
  • Loading branch information
aead committed Oct 24, 2023
1 parent d98a533 commit 404b6f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/api/multicast.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (m *Multicast) Num() int {
// Add adds w to m. Future writes to m will also reach w.
// If w is already part of m, Add does nothing.
func (m *Multicast) Add(w io.Writer) {
if m == nil {
if w == nil {
return
}

Expand Down

0 comments on commit 404b6f6

Please sign in to comment.