Raw streams's context is useless
Closed this issue · 2 comments
skaldesh commented
Lines 92f. in pkg/service/service_handler.go
// Create the service context.
sctx := newContext(context.Background(), session, data)
A background context is created here that will be passed to the stream handler func. The handler gets the impression that this is the context which can cancel the stream, when in fact, it does nothing.
skaldesh commented
The context is currently not used, but may be in the future. We must document it, so that we do not confuse the users.
Later, if we add a cancel stream method, we might populate it with a real context.
skaldesh commented
By now, the context has a meaning, it carries the session and arbitrary data.