From 988dc7c05cc2e493aa505dc4853e1aef616fa75e Mon Sep 17 00:00:00 2001 From: Patrick Nagurny Date: Sat, 20 Oct 2018 18:17:15 -0400 Subject: [PATCH] websockets allow older api version --- core/ws/ws.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/ws/ws.go b/core/ws/ws.go index 34a31e8..27b67e8 100644 --- a/core/ws/ws.go +++ b/core/ws/ws.go @@ -324,10 +324,12 @@ func checkVersion(clientVersion string) error { } serverVersion, _ := semver.NewVersion(version) + compatVersion, _ := semver.NewVersion("0.1.8") versionMatch := constraint.Check(serverVersion) + compatMatch := constraint.Check(compatVersion) - if versionMatch != true { + if versionMatch == false && compatMatch == false { return errors.New("Invalid version") }