Skip to content

Commit

Permalink
Remove unnecessary private cast (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
Doridian authored Apr 28, 2024
1 parent 23c5b90 commit f0c9a3f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions server/servers/sockets.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"github.com/Doridian/wsvpn/shared/sockets"
"github.com/Doridian/wsvpn/shared/sockets/adapters"
"github.com/google/uuid"
"github.com/quic-go/quic-go"
"github.com/quic-go/quic-go/http3"
)

Expand All @@ -39,11 +38,9 @@ func (s *Server) serveSocket(w http.ResponseWriter, r *http.Request) {

http3Hijacker, ok := w.(http3.Hijacker)
if ok {
qconn, ok := http3Hijacker.Connection().(quic.Connection)
if ok {
qtlsState := qconn.ConnectionState().TLS
tlsConnectionState = &qtlsState
}
qconn := http3Hijacker.Connection()
qtlsState := qconn.ConnectionState().TLS
tlsConnectionState = &qtlsState
}

if r.URL.Path == rootRoutePreauthorize {
Expand Down

0 comments on commit f0c9a3f

Please sign in to comment.