dgrr / websocket

WebSocket for fasthttp
MIT License
60 stars 13 forks source link

Fix 'cannot create context from nil parent' panic #2

Closed kenshaw closed 3 years ago

kenshaw commented 3 years ago

An issue introduced with the v0.0.10 to support standard context.Context for net/http does not use an initialized context, causing the context package to panic with cannot create context from nil parent.

This commit changes nctx so that it is initialized with the context.Background() value.

dgrr commented 3 years ago

Thanks for the PR!