From c93a4dedc897f84992a6a34200fe954ba2ca435d Mon Sep 17 00:00:00 2001 From: Will Hawkins Date: Sun, 12 Jun 2022 17:31:09 -0400 Subject: [Bugfix] Dereference nil when type assertions failed in IncorporateConnectionStats Errors as a result of failed type assertions in IncorporateConnectionStats were caught/logged but there was no function-termination control flow associated with these error conditions. As a result, control would continue and cause problems. This patch fixes that. --- extendedstats/other.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'extendedstats/other.go') diff --git a/extendedstats/other.go b/extendedstats/other.go index 825ea95..369c8f6 100644 --- a/extendedstats/other.go +++ b/extendedstats/other.go @@ -9,7 +9,9 @@ import ( type ExtendedStats struct{} -func (es *ExtendedStats) IncorporateConnectionStats(conn net.Conn) {} +func (es *ExtendedStats) IncorporateConnectionStats(conn net.Conn) error { + return fmt.Errorf("OOPS: IncorporateConnectionStats is not supported on this platform.") +} func (es *ExtendedStats) Repr() string { return "" -- cgit v1.2.3