mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-14 06:57:31 +00:00
ipn/ipnlocal: stay out of map poll when down
Fixes #2434 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
798b0da470
commit
6eecf3c9d1
@@ -205,6 +205,13 @@ func (lc *LogCatcher) logsString() string {
|
||||
return lc.buf.String()
|
||||
}
|
||||
|
||||
// Reset clears the buffered logs from memory.
|
||||
func (lc *LogCatcher) Reset() {
|
||||
lc.mu.Lock()
|
||||
defer lc.mu.Unlock()
|
||||
lc.buf.Reset()
|
||||
}
|
||||
|
||||
func (lc *LogCatcher) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
var body io.Reader = r.Body
|
||||
if r.Header.Get("Content-Encoding") == "zstd" {
|
||||
|
Reference in New Issue
Block a user