Skip to content

Commit

Permalink
Merge branch 'develop', version 0.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
cyfdecyf committed Oct 8, 2014
2 parents 113b96e + de4ab75 commit f712ab2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
0.9.2 (2014-09-21)
0.9.4 (2014-10-08)
* Bug fix (#179): close stat file after load

0.9.3 (2014-09-21)
* Support new encryption method "rc4-md5"

0.9.2 (2014-07-23)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COW 是一个简化穿墙的 HTTP 代理服务器。它能自动检测被墙网

[English README](README-en.md).

当前版本:0.9.3 [CHANGELOG](CHANGELOG)
当前版本:0.9.4 [CHANGELOG](CHANGELOG)
[![Build Status](https://travis-ci.org/cyfdecyf/cow.png?branch=master)](https://travis-ci.org/cyfdecyf/cow)

**欢迎在 develop branch 进行开发并发送 pull request :)**
Expand Down
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

const (
version = "0.9.3"
version = "0.9.4"
defaultListenAddr = "127.0.0.1:7777"
)

Expand Down
2 changes: 1 addition & 1 deletion install-cow.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

version=0.9.3
version=0.9.4

arch=`uname -m`
case $arch in
Expand Down
9 changes: 5 additions & 4 deletions sitestat.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func (ss *SiteStat) store(statPath string) (err error) {
os.Remove(statPath + ".bak")
os.Rename(statPath, statPath+".bak")
if err = os.Rename(f.Name(), statPath); err != nil {
errl.Println("can't rename newly created stat file", err)
errl.Println("rename new stat file", err)
return
}
return
Expand Down Expand Up @@ -381,19 +381,20 @@ func (ss *SiteStat) load(file string) (err error) {
}
}
}()
var exists bool
if exists, err = isFileExists(file); err != nil {
var exist bool
if exist, err = isFileExists(file); err != nil {
fmt.Println("Error loading stat:", err)
return
}
if !exists {
if !exist {
return
}
var f *os.File
if f, err = os.Open(file); err != nil {
fmt.Printf("Error opening site stat %s: %v\n", file, err)
return
}
defer f.Close()
b, err := ioutil.ReadAll(f)
if err != nil {
fmt.Println("Error reading site stat:", err)
Expand Down

0 comments on commit f712ab2

Please sign in to comment.