1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-06 03:27:27 +00:00

websocket: from 1k to 100k on a simple raspeberry pi 3 model b by using a bit lower level of the new ws lib api and restore the previous sync.Map for server's live connections, relative: https://github.com/kataras/iris/issues/1178

Former-commit-id: 40da148afb66a42d47285efce324269d66ed3b0e
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-02-18 04:42:57 +02:00
parent eb22309aec
commit 65c1fbf7f2
8 changed files with 295 additions and 96 deletions

View File

@@ -808,7 +808,7 @@ func DialContext(ctx stdContext.Context, url string, cfg ConnectionConfig) (Clie
ctx = stdContext.Background()
}
if !strings.HasPrefix(url, "ws://") || !strings.HasPrefix(url, "wss://") {
if !strings.HasPrefix(url, "ws://") && !strings.HasPrefix(url, "wss://") {
url = "ws://" + url
}