From 7002c4008c28265cd9cbeede93fcca2a64735973 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 3 Apr 2016 16:48:08 +0800 Subject: [PATCH] support go goroutines. Signed-off-by: Bo-Yi Wu --- gorush/notification.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/gorush/notification.go b/gorush/notification.go index 1160201..65e1040 100644 --- a/gorush/notification.go +++ b/gorush/notification.go @@ -115,24 +115,20 @@ func InitAPNSClient() error { } func pushNotification(notification RequestPushNotification) bool { - var ( - success bool - ) - switch notification.Platform { case PlatFormIos: if !PushConf.Ios.Enabled { return false } - success = pushNotificationIos(notification) + go pushNotificationIos(notification) case PlatFormAndroid: if !PushConf.Android.Enabled { return false } - success = pushNotificationAndroid(notification) + go pushNotificationAndroid(notification) } - return success + return true } // The iOS Notification Payload