MCPcopy Index your code
hub / github.com/screego/server / writeTimeout

Function writeTimeout

ws/room.go:147–153  ·  view source on GitHub ↗
(ch chan<- T, msg T)

Source from the content-addressed store, hash-verified

145}
146
147func 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}

Callers 3

executeNoErrorMethod · 0.85
WriteTimeoutMethod · 0.85
ExecuteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected