1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-15 17:46:55 +00:00

convert final touches

This commit is contained in:
Kane York 2016-06-02 09:04:46 -07:00
parent cdcb7fb079
commit 89e6298583

View file

@ -42,10 +42,6 @@ type backendInfo struct {
var Backend *backendInfo var Backend *backendInfo
var backendSharedKey [32]byte
var lastBackendSuccess map[string]time.Time
func setupBackend(config *ConfigFile) *backendInfo { func setupBackend(config *ConfigFile) *backendInfo {
b := new(backendInfo) b := new(backendInfo)
Backend = b Backend = b
@ -60,7 +56,7 @@ func setupBackend(config *ConfigFile) *backendInfo {
b.postStatisticsURL = fmt.Sprintf("%s%s", b.baseURL, bPathAggStats) b.postStatisticsURL = fmt.Sprintf("%s%s", b.baseURL, bPathAggStats)
epochTime := time.Unix(0, 0).UTC() epochTime := time.Unix(0, 0).UTC()
lastBackendSuccess = map[string]time.Time{ lastBackendSuccess := map[string]time.Time{
bPathAnnounceStartup: epochTime, bPathAnnounceStartup: epochTime,
bPathAddTopic: epochTime, bPathAddTopic: epochTime,
bPathAggStats: epochTime, bPathAggStats: epochTime,
@ -72,7 +68,7 @@ func setupBackend(config *ConfigFile) *backendInfo {
copy(theirPublic[:], config.BackendPublicKey) copy(theirPublic[:], config.BackendPublicKey)
copy(ourPrivate[:], config.OurPrivateKey) copy(ourPrivate[:], config.OurPrivateKey)
box.Precompute(&backendSharedKey, &theirPublic, &ourPrivate) box.Precompute(&b.sharedKey, &theirPublic, &ourPrivate)
return b return b
} }