Skip to content

Commit

Permalink
send a http status code 204 instead of 202 on buffered write
Browse files Browse the repository at this point in the history
send a http status code 204 since 202 is not compliant with the write API endpoint of influxdb
  • Loading branch information
Damien PLENARD committed Aug 19, 2019
1 parent e910956 commit c095cae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions relay/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ func (r *retryBuffer) post(buf []byte, query string, auth string, endpoint strin

// We do not wait for the WaitGroup because we don't want
// to leave the connection open
// The client will receive a 202 which closes the connection and
// The client will receive a 204 which closes the connection and
// invites him to send further requests
return &responseData{StatusCode: http.StatusAccepted}, err
return &responseData{StatusCode: http.StatusNoContent}, err
}

func (r *retryBuffer) run() {
Expand Down

0 comments on commit c095cae

Please sign in to comment.