From aa8d278e0fad38bbb00cb84111f5586e2e3e7d6a Mon Sep 17 00:00:00 2001 From: Nan Monnand Deng Date: Sun, 29 Jun 2014 18:48:20 -0400 Subject: [PATCH] min. wait time is 1 sec --- main.go | 2 +- pushbackend.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 1f3a7b5..01fe6ae 100644 --- a/main.go +++ b/main.go @@ -28,7 +28,7 @@ import ( var uniqushPushConfFlags = flag.String("config", "/etc/uniqush/uniqush-push.conf", "Config file path") var uniqushPushShowVersionFlag = flag.Bool("version", false, "Version info") -var uniqushPushVersion = "uniqush-push 1.5.2a5" +var uniqushPushVersion = "uniqush-push 1.5.2" func installPushSrvices() { InstallGCM() diff --git a/pushbackend.go b/pushbackend.go index f00e5d7..1a1bb5f 100644 --- a/pushbackend.go +++ b/pushbackend.go @@ -18,11 +18,11 @@ package main import ( + "sync" + "time" . "github.com/uniqush/log" . "github.com/uniqush/uniqush-push/db" . "github.com/uniqush/uniqush-push/push" - "sync" - "time" ) type PushBackEnd struct { @@ -111,7 +111,7 @@ func (self *PushBackEnd) fixError(reqId string, event error, logger Logger, afte if sub, ok = err.Destination.FixedData["subscriber"]; !ok { return nil } - if after <= 0*time.Second { + if after <= 1*time.Second { after = 5 * time.Second } if after > 1*time.Minute {