syncthing/cmd/stcrashreceiver
Jakob Borg d0ab65a178 cmd/stcrashreceiver: Don't leak clients
Use a global raven.Client because they allocate an http.Client for each,
with a separate CA bundle and infinite connection idle time. Infinite
connection idle time means that if the client is never used again it
will always keep the connection around, not verifying whether it's
closed server side or not. This leaks about a megabyte of memory for
each client every created.

client.Close() doesn't help with this because the http.Client is still
around, retained by its own goroutines.

The thing with the map is just to retain the API on sendReport, even
though there will in practice only ever be one DSN per process
instance...
2019-07-09 11:11:06 +02:00
..
_testdata lib/ur: Implement crash (panic) reporting (fixes #959) (#5702) 2019-06-11 08:19:11 +02:00
sentry_test.go lib/ur: Implement crash (panic) reporting (fixes #959) (#5702) 2019-06-11 08:19:11 +02:00
sentry.go cmd/stcrashreceiver: Don't leak clients 2019-07-09 11:11:06 +02:00
sourcecodeloader.go cmd/stcrashreceiver: Add source code loader (#5779) 2019-06-29 08:50:09 +02:00
stcrashreceiver.go lib/ur: Implement crash (panic) reporting (fixes #959) (#5702) 2019-06-11 08:19:11 +02:00