(ch chan<- T, msg T)
| 145 | } |
| 146 | |
| 147 | func writeTimeout[T any](ch chan<- T, msg T) { |
| 148 | select { |
| 149 | case <-time.After(2 * time.Second): |
| 150 | log.Warn().Interface("event", fmt.Sprintf("%T", msg)).Interface("payload", msg).Msg("Client write loop didn't accept the message.") |
| 151 | case ch <- msg: |
| 152 | } |
| 153 | } |
no outgoing calls
no test coverage detected