Skip to content

Commit 49f3f0d

Browse files
committed
fix error
1 parent b35380a commit 49f3f0d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

internal/pool/pubsub.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package pool
22

33
import (
44
"context"
5-
"errors"
65
"net"
76
"sync"
87
"sync/atomic"
@@ -34,7 +33,7 @@ func NewPubSubPool(opt *Options, netDialer func(ctx context.Context, network, ad
3433

3534
func (p *PubSubPool) NewConn(ctx context.Context, network string, addr string, channels []string) (*Conn, error) {
3635
if p.closed.Load() {
37-
return nil, errors.New("pubsub pool is closed")
36+
return nil, ErrClosed
3837
}
3938

4039
netConn, err := p.netDialer(ctx, network, addr)

0 commit comments

Comments
 (0)