devnw / stream

stream is a concurrency pattern implementation using Go generics. a.k.a. my accidentally awesome library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Possible issue with Nil data or Channel in Fan-Out

benjivesterby opened this issue Β· comments

🐞 Describe the bug

Panic occurred in Stream possibly due to nil channel or nil data on channel when using fan-out

panic: reflect.Select: SendDir case missing Send value

goroutine 817 [running]:
reflect.Select({0xc0002aca80?, 0x2, 0x0?})
        /usr/local/go/src/reflect/value.go:2922 +0x6f2
go.atomizer.io/stream.FanOut[...]({0x55f8d88, 0xc009086000?}, 0xc009088120?, {0xc009090000, 0x1, 0x2})

πŸ“š To Reproduce

πŸ’‘ Expected behavior

Should not panic on nil channel or nil data

βš™οΈ Environment

  • Release Version: v1.0.7
  • OS: Linux
  • Architecture: x86_64
  • Go Version: 1.19

I encountered this panic when I attempted to send nil on a channel that was part of a FanOut

I haven't been able to reproduce this since