summaryrefslogtreecommitdiffstats
path: root/api/webrtc.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-01-24 20:02:41 -0500
committerGitHub <noreply@github.com>2017-01-24 20:02:41 -0500
commit27f76afb288b7c24f5ce1d0274ed3ae73c77e076 (patch)
tree4590b87b55ba97752a6760c18be90c2bda582de2 /api/webrtc.go
parent3234f98aec24c4f0f04fa6d083678afbf793b9d2 (diff)
downloadchat-27f76afb288b7c24f5ce1d0274ed3ae73c77e076.tar.gz
chat-27f76afb288b7c24f5ce1d0274ed3ae73c77e076.tar.bz2
chat-27f76afb288b7c24f5ce1d0274ed3ae73c77e076.zip
Closing response body when fetching link previews (#5181)
Diffstat (limited to 'api/webrtc.go')
-rw-r--r--api/webrtc.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/api/webrtc.go b/api/webrtc.go
index 15b7cfa4f..7ea6b2e42 100644
--- a/api/webrtc.go
+++ b/api/webrtc.go
@@ -8,7 +8,6 @@ import (
"crypto/sha1"
"crypto/tls"
"encoding/base64"
- "io/ioutil"
"net/http"
"strconv"
"strings"
@@ -108,10 +107,3 @@ func generateTurnPassword(username string, secret string) string {
h.Write([]byte(username))
return base64.StdEncoding.EncodeToString(h.Sum(nil))
}
-
-func closeBody(r *http.Response) {
- if r.Body != nil {
- ioutil.ReadAll(r.Body)
- r.Body.Close()
- }
-}