Skip to content

Commit

Permalink
Removed old comments, bumped buffers version.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotcourant committed Dec 1, 2019
1 parent ed43ee8 commit 32aac64
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.12
require (
github.com/ahmetb/go-linq/v3 v3.1.0
github.com/dgraph-io/badger v1.6.0
github.com/elliotcourant/buffers v1.0.0
github.com/elliotcourant/buffers v0.0.0-20191201042100-3d9daf6f332b
github.com/elliotcourant/timber v0.0.0-20190831033938-85b1f62dde82
github.com/hashicorp/go-hclog v0.9.2
github.com/hashicorp/raft v1.1.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczC
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/elliotcourant/buffers v0.0.0-20190811025309-24fdba97ca9b h1:hnBfbE6sWwWGpCiFwSWvzsOxxuEujfmk+xYr+a98pHc=
github.com/elliotcourant/buffers v0.0.0-20190811025309-24fdba97ca9b/go.mod h1:9+oLElsEQnueTyoq0dyr6RiJwELNE+YtLXh4BNAsnKg=
github.com/elliotcourant/buffers v0.0.0-20191201042100-3d9daf6f332b h1:35ZXu2t4bU1snDlC1BwLAZ7f425Pxz+abdRd9hhzflU=
github.com/elliotcourant/buffers v0.0.0-20191201042100-3d9daf6f332b/go.mod h1:9+oLElsEQnueTyoq0dyr6RiJwELNE+YtLXh4BNAsnKg=
github.com/elliotcourant/timber v0.0.0-20190831033938-85b1f62dde82 h1:rAx7YfNNnDIik1N7Zj/lQjt2b/5aejQLGQEc+v18t7M=
github.com/elliotcourant/timber v0.0.0-20190831033938-85b1f62dde82/go.mod h1:Qt+GcRn3FBq5YMmfc+MtIgGyN4fq3lZaRNYDlkOeigg=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
Expand Down
6 changes: 2 additions & 4 deletions raft_wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ type serverWireBase struct {
}

func (r *serverWireBase) Send(msg serverMessage) error {
// time.Sleep(time.Millisecond * 1)
_, err := r.w.Write(writeWireMessage(msg))
return err
}
Expand All @@ -167,7 +166,7 @@ func (r *serverWireBase) Receive() (clientMessage, error) {

buf := buffers.NewBytesReader(header)
r.msgType = buf.NextUint8()
r.bodyLen = buf.NextInt32()
r.bodyLen = buf.NextInt32() - 4
}

msgBody, err := r.cr.Next(int(r.bodyLen))
Expand Down Expand Up @@ -251,7 +250,6 @@ func (r *clientWireBase) handshake(intention handshakeIntention) error {
}

func (r *clientWireBase) Send(msg clientMessage) error {
// time.Sleep(time.Millisecond * 1)
_, err := r.w.Write(writeWireMessage(msg))
return err
}
Expand All @@ -265,7 +263,7 @@ func (r *clientWireBase) Receive() (serverMessage, error) {

buf := buffers.NewBytesReader(header)
r.msgType = buf.NextUint8()
r.bodyLen = buf.NextInt32()
r.bodyLen = buf.NextInt32() - 4
}

msgBody, err := r.cr.Next(int(r.bodyLen))
Expand Down

0 comments on commit 32aac64

Please sign in to comment.