MM-34125: Remove WebSocketDelay feature flag (#17441)

It has been soaked for enough time in community-daily
and also in community. Enabling it for all.

```release-note
TCP_NO_DELAY is disabled for websocket connections
to allow for higher throughput
```

https://mattermost.atlassian.net/browse/MM-34125
Этот коммит содержится в:
Agniva De Sarker
2021-04-20 10:10:22 +05:30
коммит произвёл GitHub
родитель a16fdb5001
Коммит 4295a1f556
2 изменённых файлов: 8 добавлений и 11 удалений

Просмотреть файл

@@ -71,14 +71,14 @@ func (a *App) NewWebConn(ws *websocket.Conn, session model.Session, t i18n.Trans
})
}
if a.srv.Config().FeatureFlags.WebSocketDelay {
// Disable TCP_NO_DELAY for higher throughput
tcpConn, ok := ws.UnderlyingConn().(*net.TCPConn)
if ok {
err := tcpConn.SetNoDelay(false)
if err != nil {
mlog.Warn("Error in setting NoDelay socket opts", mlog.Err(err))
}
// Disable TCP_NO_DELAY for higher throughput
// Unfortunately, it doesn't work for tls.Conn,
// and currently, the API doesn't expose the underlying TCP conn.
tcpConn, ok := ws.UnderlyingConn().(*net.TCPConn)
if ok {
err := tcpConn.SetNoDelay(false)
if err != nil {
mlog.Warn("Error in setting NoDelay socket opts", mlog.Err(err))
}
}