Skip to content

Commit

Permalink
Merge pull request #249 from kuzzleio/fix-memleak-on-reconnect
Browse files Browse the repository at this point in the history
[hotfix] Try to reconnect if the state is not errored
  • Loading branch information
jenow authored Aug 7, 2019
2 parents ed23348 + 0392f60 commit df484a7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ env:

jobs:
include:
- name: Documentation test
language: go
go: 1.12.x
script:
- docker-compose -f .ci/doc/docker-compose.yml run doc-tests node index
- name: Documentation test
language: go
go: 1.12.x
script:
- docker-compose -f .ci/doc/docker-compose.yml run doc-tests node index

# -----------------------------------------------
# Linux amd64
Expand Down
2 changes: 1 addition & 1 deletion kuzzle/kuzzle.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
)

const (
version = "2.0.0"
version = "2.0.1"
MAX_CONNECT_RETRY = 10
)

Expand Down
2 changes: 1 addition & 1 deletion kuzzle/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func TestQueryWithOptions(t *testing.T) {

func TestQueryWithVolatile(t *testing.T) {
var k *kuzzle.Kuzzle
var volatileData = types.VolatileData(`{"modifiedBy":"awesome me","reason":"it needed to be modified","sdkVersion":"2.0.0"}`)
var volatileData = types.VolatileData(`{"modifiedBy":"awesome me","reason":"it needed to be modified","sdkVersion":"2.0.1"}`)

c := &internal.MockedConnection{
MockSend: func(query []byte, options types.QueryOptions) *types.KuzzleResponse {
Expand Down
2 changes: 1 addition & 1 deletion protocol/websocket/web_socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func NewWebSocket(host string, options types.Options) *WebSocket {

//Connect connects to a kuzzle instance
func (ws *WebSocket) Connect() (bool, error) {
if ws.state != state.Offline {
if ws.state != state.Offline && ws.state != state.Disconnected && ws.state != state.Error {
return false, nil
}

Expand Down

0 comments on commit df484a7

Please sign in to comment.