Skip to content

Commit

Permalink
Fix the logic that breaks the repsonse
Browse files Browse the repository at this point in the history
  • Loading branch information
jvshahid committed May 30, 2014
1 parent e9b2ce5 commit c89a6d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/coordinator/protobuf_request_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ func (self *ProtobufRequestHandler) handleDropDatabase(request *protocol.Request

func (self *ProtobufRequestHandler) WriteResponse(conn net.Conn, response *protocol.Response) error {
if response.Size() >= MAX_RESPONSE_SIZE {
pointCount := len(response.Series.Points)
firstHalfPoints := response.Series.Points[:pointCount]
secondHalfPoints := response.Series.Points[pointCount:]
l := len(response.Series.Points)
firstHalfPoints := response.Series.Points[:l/2]
secondHalfPoints := response.Series.Points[l/2:]
response.Series.Points = firstHalfPoints
err := self.WriteResponse(conn, response)
if err != nil {
Expand Down

0 comments on commit c89a6d3

Please sign in to comment.