Skip to content

Commit

Permalink
Fix ticket chan.
Browse files Browse the repository at this point in the history
  • Loading branch information
wizjin committed Nov 30, 2015
1 parent 5c7272c commit 26fd083
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions weixin.go
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ func createAccessToken(c chan accessToken, appid string, secret string) {

func createJsApiTicket(cin chan accessToken, c chan jsApiTicket) {
ticket := jsApiTicket{"", time.Now()}
c <- ticket
for {
if time.Since(ticket.expires).Seconds() >= 0 {
t, err := getJsApiTicket(cin)
Expand Down

0 comments on commit 26fd083

Please sign in to comment.