Skip to content

Commit

Permalink
Exit bug、web display
Browse files Browse the repository at this point in the history
  • Loading branch information
刘河 committed Apr 20, 2019
1 parent 89f1e72 commit 45521d5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion client/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ func NewConn(tp string, vkey string, server string, connType string, proxyUrl st
if err != nil {
return nil, err
}
connection.SetDeadline(time.Now().Add(time.Second * 10))
defer connection.SetDeadline(time.Time{})
c := conn.NewConn(connection)
if _, err := c.Write([]byte(common.CONN_TEST)); err != nil {
return nil, err
Expand All @@ -220,7 +222,7 @@ func NewConn(tp string, vkey string, server string, connType string, proxyUrl st
}
if b, err := c.GetShortContent(32); err != nil || crypt.Md5(version.GetVersion()) != string(b) {
logs.Error("The client does not match the server version. The current version of the client is", version.GetVersion())
os.Exit(0)
return nil, err
}
if _, err := c.Write([]byte(common.Getverifyval(vkey))); err != nil {
return nil, err
Expand Down
4 changes: 2 additions & 2 deletions lib/file/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (s *DbUtils) GetClientList(start, length int, search, sort, order string, c
}
cnt++
if start--; start < 0 {
if length--; length > 0 {
if length--; length >= 0 {
list = append(list, v)
}
}
Expand Down Expand Up @@ -187,7 +187,7 @@ func (s *DbUtils) GetHost(start, length int, id int, search string) ([]*Host, in
if id == 0 || v.Client.Id == id {
cnt++
if start--; start < 0 {
if length--; length > 0 {
if length--; length >= 0 {
list = append(list, v)
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/version/version.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package version

const VERSION = "0.22.4"
const VERSION = "0.22.5"

// Compulsory minimum version, Minimum downward compatibility to this version
func GetVersion() string {
Expand Down
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func GetTunnel(start, length int, typeVal string, clientId int, search string) (
v.Client.IsConnect = false
}
if start--; start < 0 {
if length--; length > 0 {
if length--; length >= 0 {
if _, ok := RunList[v.Id]; ok {
v.RunStatus = true
} else {
Expand Down

0 comments on commit 45521d5

Please sign in to comment.