Skip to content

Commit c72a334

Browse files
authored
Merge pull request #126 from getlantern/fix-e2e-cgo
Fix nil pointer panic in algeneva inbound
2 parents a097bc5 + 83c0185 commit c72a334

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

protocol/algeneva/inbound.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ func (a *Inbound) Close() error {
6969
func (a *Inbound) NewConnectionEx(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc) {
7070
metadata.Inbound = a.Tag()
7171
metadata.InboundType = a.Type()
72-
conn, err := a.newConnectionEx(ctx, conn)
72+
wsConn, err := a.newConnectionEx(ctx, conn)
7373
if err != nil {
7474
N.CloseOnHandshakeFailure(conn, onClose, err)
7575
a.logger.ErrorContext(ctx, exceptions.Cause(err, "process connection from ", metadata.Source))
7676
return
7777
}
78-
a.httpInbound.NewConnectionEx(ctx, conn, metadata, onClose)
78+
a.httpInbound.NewConnectionEx(ctx, wsConn, metadata, onClose)
7979
}
8080

8181
// newConnectionEx processes the connection and upgrades it to a WebSocket connection.

0 commit comments

Comments
 (0)