1
0
Fork 0
forked from External/grumble

Update for Go 1.

This commit is contained in:
Mikkel Krautz 2012-02-06 22:16:16 +01:00
parent 4114a83d64
commit e46a65109f
31 changed files with 901 additions and 202 deletions

View file

@ -7,16 +7,16 @@ package main
import (
"bufio"
"bytes"
"code.google.com/p/goprotobuf/proto"
"crypto/tls"
"encoding/binary"
"goprotobuf.googlecode.com/hg/proto"
"grumble/blobstore"
"grumble/cryptstate"
"grumble/mumbleproto"
"github.com/mkrautz/grumble/pkg/blobstore"
"github.com/mkrautz/grumble/pkg/cryptstate"
"github.com/mkrautz/grumble/pkg/mumbleproto"
"io"
"log"
"net"
"packetdatastream"
"github.com/mkrautz/grumble/pkg/packetdatastream"
"runtime"
"time"
)
@ -567,11 +567,11 @@ func (client *Client) sendChannelTree(channel *Channel) {
// Try to do a crypto resync
func (client *Client) cryptResync() {
goodElapsed := time.Seconds() - client.crypt.LastGoodTime
goodElapsed := time.Now().Unix() - client.crypt.LastGoodTime
if goodElapsed > 5 {
requestElapsed := time.Seconds() - client.lastResync
requestElapsed := time.Now().Unix() - client.lastResync
if requestElapsed > 5 {
client.lastResync = time.Seconds()
client.lastResync = time.Now().Unix()
cryptsetup := &mumbleproto.CryptSetup{}
err := client.sendMessage(cryptsetup)
if err != nil {