manticoresoftware / manticoresoftware/go-sdk

SDK can't restore connection after disconnection

Open
#22 4 comments 0 reactions 0 assignees View on GitHub
waiting for OP
Dominant language
Go
Stars
58
Forks
9
PR merge metrics
No merged PRs in 30d

Description

SDK can't restore connection after disconnection

```go
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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the sample's NewClient, Open, and RunQuery flow in the Go SDK, then run it against Manticore and restart the server as described. Trace how the client handles the broken-pipe error; done means the connection is restored and search results continue without restarting the program.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.