kataras / neffos

A modern, fast and scalable websocket framework with elegant API written in Go
http://bit.ly/neffos-wiki
MIT License
572 stars 47 forks source link

[BUG] the context ptr in socketWrapper may be modified #114

Open DOLLook opened 2 months ago

DOLLook commented 2 months ago

when call Upgrade(ctx context.Context, idGen IDGenerator, s neffos.Server) *neffos.Conn{}. The iris context will be cached in the &socketWrapper{Socket: socket,ctx: ctx}. But it may be modified to other http request context. And I search the ctx set to the socketWrapper, only the Upgrade set it. Why the context may changed.