Skip to content

Commit

Permalink
update sniper
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadim Kilibaba committed Oct 28, 2019
1 parent 969164e commit 223d8ee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions b52.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ func (db *b52) Set(key, value []byte, flags uint32, exp int32, size int, noreply
db.slave = c
}
if db.slave != nil && flags != 42 && err == nil {
n, e := fmt.Fprintf(db.slave, "set %s 42 0 %d\r\n%s\r\n", key, len(value), value)
if e != nil {
fmt.Println("slave err", e.Error(), n)
db.slave = nil
}
go fmt.Fprintf(db.slave, "set %s 42 0 %d\r\n%s\r\n", key, len(value), value)
//if e != nil {
//fmt.Println("slave err", e.Error(), n)
//db.slave = nil
//}
}
return
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/golang/snappy v0.0.1
github.com/kavu/go_reuseport v1.4.0 // indirect

github.com/recoilme/sniper v0.1.1
github.com/recoilme/sniper v0.1.2
github.com/tidwall/evio v1.0.2

github.com/tidwall/lotsa v0.0.0-20190911211615-e96c7fea75f1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/recoilme/sniper v0.1.1 h1:wfbLandgrTMWZNqZ+xDUiK4DDcuIAR5Pm5w/sLnAM9I=
github.com/recoilme/sniper v0.1.1/go.mod h1:8Q9MpI//VA5hQygl7oyRqym6B5vz/qZNGfF2a5BKNYI=
github.com/recoilme/sniper v0.1.2 h1:o4GkWvRQL9R8p6aVxamX0S7xmSE0IOUVyEPt0OpBU0Y=
github.com/recoilme/sniper v0.1.2/go.mod h1:8Q9MpI//VA5hQygl7oyRqym6B5vz/qZNGfF2a5BKNYI=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
Expand Down

0 comments on commit 223d8ee

Please sign in to comment.