Skip to content

Commit

Permalink
Fix my bad English
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloyan-raev committed Aug 9, 2018
1 parent eb92375 commit a21e029
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/eestream/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func (er *encodedReader) copyData(num int, copier <-chan block) {

func (er *encodedReader) addToReader(b block) {
if er.eps[b.i].ch == nil {
// this channel is already closed for slowliness - skip it
// this channel is already closed for slowness - skip it
return
}
for {
Expand Down Expand Up @@ -284,7 +284,7 @@ func (ep *encodedPiece) Read(p []byte) (n int, err error) {
select {
case b, ok := <-ep.ch:
if !ok {
// channel was closed due to slowliness
// channel was closed due to slowness
return 0, io.ErrUnexpectedEOF
}
if b.err != nil {
Expand All @@ -297,7 +297,7 @@ func (ep *encodedPiece) Read(p []byte) (n int, err error) {
ep.outbuf = b.data
case <-ep.ctx.Done():
// context was canceled due to:
// - slowliness
// - slowness
// - optimum threshold reached
// - timeout after reaching minimum threshold expired
return 0, io.ErrUnexpectedEOF
Expand Down
2 changes: 1 addition & 1 deletion pkg/piecestore/rpc/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (client *Client) Put(ctx context.Context, id PieceID, data io.Reader, ttl t
_, err = io.Copy(bufw, data)
if err == io.ErrUnexpectedEOF {
writer.Close()
zap.S().Infof("Node cut from upload due to slowliness. Deleting piece %s...", id)
zap.S().Infof("Node cut from upload due to slowness. Deleting piece %s...", id)
return client.Delete(ctx, id)
}
if err != nil {
Expand Down

0 comments on commit a21e029

Please sign in to comment.