Recently upgraded deepgram-go-sdk to v1.3.6 because of panic: repeated read on failed websocket connection on reconnection. Since then I have been getting errors on closing socket connection.
Here's the code for the error handler
func (c DeepgramCallback) Error(r *api.ErrorResponse) error {
c.log.Errorf("[Error] Received")
c.log.Errorf("Error.Type: %s", r.Type)
c.log.Errorf("Error.Message: %s", r.Message)
c.log.Tracef("Error.Description: %s", r.Description)
return nil
}
And the logs for errors
[Error] Received
Error.Type: Error
Error.Message: unknown deepgram error unknown deepgram error
Error.Description: read tcp 10.8.5.235:36214->38.142.135.244:443: use of closed network connection
I0709 06:24:40.571493 1 client.go:818] listen: router.Error failed. Err: <nil>
I0709 06:24:40.571511 1 client.go:349] listen: Fatal socket error. Err: read tcp 10.8.5.235:36214->38.142.135.244:443: use of closed network connection
How to handle this?