Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

accept appengine users #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion gcm.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ var (
}{
m: make(map[string]*xmppGcmClient),
}
Client *http.Client
)

// Prints debug info if DebugMode is set.
Expand Down Expand Up @@ -463,7 +464,10 @@ func (eb exponentialBackoff) wait() {

// Send a message using the HTTP GCM connection server.
func SendHttp(apiKey string, m HttpMessage) (*HttpResponse, error) {
c := &httpGcmClient{httpAddress, &http.Client{}, "0"}
if Client == nil {
Client = &http.Client{}
}
c := &httpGcmClient{httpAddress, Client, "0"}
b := newExponentialBackoff()
return sendHttp(apiKey, m, c, b)
}
Expand Down