diff --git a/common/persistence/nosql/nosqlplugin/cassandra/gocql/session.go b/common/persistence/nosql/nosqlplugin/cassandra/gocql/session.go index c95dc0bbd7a..65736d6910c 100644 --- a/common/persistence/nosql/nosqlplugin/cassandra/gocql/session.go +++ b/common/persistence/nosql/nosqlplugin/cassandra/gocql/session.go @@ -28,6 +28,7 @@ import ( "context" "sync" "sync/atomic" + "syscall" "time" "github.com/gocql/gocql" @@ -181,7 +182,10 @@ func (s *session) handleError( err error, ) { switch err { - case gocql.ErrNoConnections: + case gocql.ErrNoConnections, + gocql.ErrSessionClosed, + gocql.ErrConnectionClosed, + syscall.ECONNRESET: s.refresh() default: // noop