Skip to content

Commit

Permalink
Merge pull request #9 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 2.3.1
  • Loading branch information
andyone authored Jul 6, 2017
2 parents 4468e66 + 787b79a commit 4e3b4b1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
5 changes: 4 additions & 1 deletion common/redis-latency-monitor.spec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Summary: Tiny Redis client for latency measurement
Name: redis-latency-monitor
Version: 2.3.0
Version: 2.3.1
Release: 0%{?dist}
Group: Applications/System
License: EKOL
Expand Down Expand Up @@ -58,6 +58,9 @@ rm -rf %{buildroot}
###############################################################################

%changelog
* Thu Jul 06 2017 Anton Novojilov <[email protected]> - 2.3.1-0
- Added auth error handling

* Mon Jun 26 2017 Anton Novojilov <[email protected]> - 2.3.0-0
- Added option --error-log/-e for logging error messages
- Improved working with Redis connection
Expand Down
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ Examples

### Build Status

| Repository | Status |
|------------|--------|
| Stable | [![Build Status](https://travis-ci.org/essentialkaos/redis-latency-monitor.svg?branch=master)](https://travis-ci.org/essentialkaos/redis-latency-monitor) |
| Unstable | [![Build Status](https://travis-ci.org/essentialkaos/redis-latency-monitor.svg?branch=develop)](https://travis-ci.org/essentialkaos/redis-latency-monitor) |
| Branch | Status |
|--------|--------|
| `master` | [![Build Status](https://travis-ci.org/essentialkaos/redis-latency-monitor.svg?branch=master)](https://travis-ci.org/essentialkaos/redis-latency-monitor) |
| `develop` | [![Build Status](https://travis-ci.org/essentialkaos/redis-latency-monitor.svg?branch=develop)](https://travis-ci.org/essentialkaos/redis-latency-monitor) |

### License

Expand Down
14 changes: 11 additions & 3 deletions redis-latency-monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (

const (
APP = "Redis Latency Monitor"
VER = "2.3.0"
VER = "2.3.1"
DESC = "Tiny Redis client for latency measurement"
)

Expand Down Expand Up @@ -177,7 +177,15 @@ func connectToRedis(reconnect bool) error {
}

if options.GetS(OPT_AUTH) != "" {
conn.Write([]byte("AUTH " + options.GetS(OPT_AUTH) + "\n"))
_, err = conn.Write([]byte("AUTH " + options.GetS(OPT_AUTH) + "\r\n"))

if err != nil {
if !reconnect {
printErrorAndExit("Can't send AUTH command")
} else {
return err
}
}
}

return nil
Expand Down Expand Up @@ -431,7 +439,7 @@ func shutdown(code int) {
outputWriter.Flush()
}

os.Exit(1)
os.Exit(code)
}

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down

0 comments on commit 4e3b4b1

Please sign in to comment.