Skip to content

Commit

Permalink
tests: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
kataras committed Nov 5, 2023
1 parent 09da695 commit 11f04ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db_information_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func handleExampleError(err error) {
}

func ExampleDB_ListColumns() {
db, err := openTestConnection(false)
db, err := openTestConnection(true)
if err != nil {
handleExampleError(err)
return
Expand Down
3 changes: 2 additions & 1 deletion db_table_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"io"
"net"
"strings"
"sync/atomic"

Expand Down Expand Up @@ -234,7 +235,7 @@ func (db *DB) ListenTable(ctx context.Context, opts *ListenTableOptions, callbac

notification, err := conn.Accept(ctx)
if err != nil {
if errors.Is(err, io.ErrUnexpectedEOF) {
if errors.Is(err, io.ErrUnexpectedEOF) || errors.Is(err, net.ErrClosed) {
return // may produced by close.
}

Expand Down

0 comments on commit 11f04ff

Please sign in to comment.