forked from mattermost/mattermost
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MM-34000: Use non-epoll mode for TLS connections (mattermost#17172)
* MM-34000: Use non-epoll mode for TLS connections A *crypto/tls.Conn does not expose the underlying TCP connection or even a File method to get the underlying file descriptor like the way a *net/TCPConn does. Therefore the netpoll code would fail to get the file descriptor. Relevant issue here: mailru/easygo#3 It is indeed possible to use reflect black magic to get the unexported member, but I have found unexpected errors during writing to the websocket by getting the file descriptor this way. I do not want to spend time investigating this especially since this is already released. Once this is out, we can decide on the right way to fix this, most probably by proposing to expose the File method or some other way. https://mattermost.atlassian.net/browse/MM-34000 ```release-note Fix an issue where websockets wouldn't work with TLS connections. In that case, we just fall back to the way it works for Windows machines, which is to use a separate goroutine for reader connection. ``` * Ignore logging errors on non-epoll On non-epoll systems, we needed to return an error to break from the loop. But in that case, there is no need to log the error (cherry picked from commit 2743089)
- Loading branch information
1 parent
91761b4
commit b6597c8
Showing
2 changed files
with
19 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters