Remove redundant nil check per code review

Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-11 01:16:57 +00:00
parent aca75d5b80
commit 8b65579719
-2
View File
@@ -277,7 +277,6 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte
rawInput = (*bytes.Buffer)(unsafe.Pointer(p + r.Offset)) rawInput = (*bytes.Buffer)(unsafe.Pointer(p + r.Offset))
// For pre-established connections, clear any buffered TLS control messages // For pre-established connections, clear any buffered TLS control messages
// to prevent them from corrupting the Vision stream // to prevent them from corrupting the Vision stream
if conn != nil {
// Drain input buffer (decrypted but unread application data) // Drain input buffer (decrypted but unread application data)
if input != nil && input.Len() > 0 { if input != nil && input.Len() > 0 {
// This should normally be empty for a fresh connection // This should normally be empty for a fresh connection
@@ -290,7 +289,6 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte
// These should be discarded as they're not part of the application data // These should be discarded as they're not part of the application data
rawInput.Reset() rawInput.Reset()
} }
}
default: default:
panic("unknown VLESS request command") panic("unknown VLESS request command")
} }