diff options
| author | Will Hawkins <[email protected]> | 2022-06-12 17:31:09 -0400 |
|---|---|---|
| committer | Will Hawkins <[email protected]> | 2022-06-12 17:31:09 -0400 |
| commit | c93a4dedc897f84992a6a34200fe954ba2ca435d (patch) | |
| tree | 83643f39a3037599924485dffa7af114ecacea3b /extendedstats/other.go | |
| parent | bce8d0a53c56816e6b5acd4e0c9b53514981910a (diff) | |
[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.
Diffstat (limited to 'extendedstats/other.go')
| -rw-r--r-- | extendedstats/other.go | 4 |
1 files changed, 3 insertions, 1 deletions
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 "" |
