Closed winecraft-dev closed 3 months ago
I'm writing a program that does some waiting during the PreLoginEvent. To narrow down what happens to the Context, I am using this code:
func (p *MyProxy) HandlePreLogin(e *proxy.PreLoginEvent) { fmt.Println("Beginning wait...") <-e.Conn().Context().Done() fmt.Println("Wait is over!") }
When I run this handler and start my connection I get this printed out:
Beginning wait
And even if the user disconnects, this context is not cancelled so only the first line is printed. On the latest version of Gate v0.38.0.
Is it still relevant, or was it resolved in Discord?
I'm writing a program that does some waiting during the PreLoginEvent. To narrow down what happens to the Context, I am using this code:
When I run this handler and start my connection I get this printed out:
And even if the user disconnects, this context is not cancelled so only the first line is printed. On the latest version of Gate v0.38.0.