Skip to content

SDK can't restore connection after disconnection #22

Description

@dimuska139

SDK can't restore connection after disconnection

package main

import "github.com/manticoresoftware/go-sdk/manticore"
import "fmt"

func main() {
	cl := manticore.NewClient()
	cl.SetServer("127.0.0.1", 9311)
	_, err := cl.Open()
	if err != nil {
		fmt.Println(err)
	}
	for ;; {
		search := manticore.NewSearch("аватар", "idx_movies", "")
		search.Limit = 10
		res, err := cl.RunQuery(search)
		if err != nil {
			fmt.Println(err)
			continue
		}
		for _, item := range res.Matches {
			fmt.Println(item.Attrs[0])
		}
	}
}

Just run this sample, make sure the results start showing up and restart manticore after few seconds. The connection will not be restored and the program will continue to give an error (write tcp 127.0.0.1:49914->127.0.0.1:9311: write: broken pipe) despite the fact that the Manticore is already available

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions