fix(codersdk): abort in-progress writes/reads when closing websocket (#12650)

Fixes #9203

Related #12065

Also, adds some basic tracing infrastructure that we can build upon for more improvements.
This commit is contained in:
Ammar Bandukwala
2024-03-20 11:53:32 -05:00
committed by GitHub
parent 92aa1eba97
commit 0d86dca852
2 changed files with 18 additions and 1 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ func (c *wsNetConn) Write(b []byte) (n int, err error) {
}
func (c *wsNetConn) Close() error {
defer c.cancel()
c.cancel()
return c.Conn.Close()
}