Skip to content

Commit

Permalink
Update wire.go
Browse files Browse the repository at this point in the history
fix typo
  • Loading branch information
chai2010 authored Jul 6, 2021
1 parent d5639b5 commit e05c898
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

var (
UseSappy = true
UseSnappy = true
UseCrc32ChecksumIEEE = true
)

Expand Down Expand Up @@ -49,7 +49,7 @@ func writeRequest(w io.Writer, id uint64, method string, request proto.Message)
Checksum: crc32.ChecksumIEEE(compressedPbRequest),
}

if !UseSappy {
if !UseSnappy {
header.SnappyCompressedRequestLen = 0
compressedPbRequest = pbRequest
}
Expand Down Expand Up @@ -164,7 +164,7 @@ func writeResponse(w io.Writer, id uint64, serr string, response proto.Message)
Checksum: crc32.ChecksumIEEE(compressedPbResponse),
}

if !UseSappy {
if !UseSnappy {
header.SnappyCompressedResponseLen = 0
compressedPbResponse = pbResponse
}
Expand Down

0 comments on commit e05c898

Please sign in to comment.