Skip to content

Commit

Permalink
Specify go 1.1 in Travis, remove unnecessary return.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyfdecyf committed Jun 13, 2013
1 parent 2c1c359 commit f5097a5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
language: go
go:
- 1.1
install:
- go get github.com/cyfdecyf/leakybuf
- go get code.google.com/p/go.crypto/blowfish
Expand Down
7 changes: 5 additions & 2 deletions cmd/shadowsocks-httpget/httpget.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func doOneRequest(client *http.Client, uri string, buf []byte) (err error) {
return
}

func get(connid int, uri, serverAddr string, rawAddr []byte, cipher ss.Cipher, done chan []time.Duration) {
func get(connid int, uri, serverAddr string, rawAddr []byte, cipher *ss.Cipher, done chan []time.Duration) {
reqDone := 0
reqTime := make([]time.Duration, config.nreq)
defer func() {
Expand Down Expand Up @@ -96,6 +96,10 @@ func main() {

runtime.GOMAXPROCS(config.core)
uri := flag.Arg(0)
if strings.HasPrefix(uri, "https://") {
fmt.Println("https not supported")
os.Exit(1)
}
if !strings.HasPrefix(uri, "http://") {
uri = "http://" + uri
}
Expand All @@ -122,7 +126,6 @@ func main() {
rawAddr, err := ss.RawAddr(host)
if err != nil {
panic("Error getting raw address.")
return
}

done := make(chan []time.Duration)
Expand Down
2 changes: 0 additions & 2 deletions shadowsocks/encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,4 @@ func (c *Cipher) Copy() *Cipher {
nc.dec = nil
return &nc
}
// should not reach here, keep it to make go 1.0.x compiler happy
return nil
}

0 comments on commit f5097a5

Please sign in to comment.