Skip to content

Commit

Permalink
Merge pull request #280 from virtyaluk/main
Browse files Browse the repository at this point in the history
fix(schemaless client): check for returned errors before using the WebSocket client that may lead to panic in the code.
  • Loading branch information
huskar-t authored Aug 29, 2024
2 parents 39ad8dc + d63c3d1 commit b08f7b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ws/schemaless/schemaless.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ func NewSchemaless(config *Config) (*Schemaless, error) {
dialer := common.DefaultDialer
dialer.EnableCompression = config.enableCompression
ws, _, err := dialer.Dial(wsUrl.String(), nil)
ws.EnableWriteCompression(config.enableCompression)
if err != nil {
return nil, fmt.Errorf("dial ws error: %s", err)
}
ws.EnableWriteCompression(config.enableCompression)

s := Schemaless{
client: client.NewClient(ws, config.chanLength),
Expand Down

0 comments on commit b08f7b4

Please sign in to comment.