Skip to content

Commit 5ba31f6

Browse files
committed
fix logging close errors
1 parent 4c27920 commit 5ba31f6

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

pubsub/pubsub.go

+2-7
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,8 @@ type Pubsub struct {
2525

2626
// Close ...
2727
func (p *Pubsub) Close() {
28-
if err := p.conn.Close(); err != nil {
29-
fmt.Println("failed to close connection: ", err.Error())
30-
}
31-
32-
if err := p.ch.Close(); err != nil {
33-
fmt.Println("failed to close channel: ", err.Error())
34-
}
28+
_ = p.conn.Close()
29+
_ = p.ch.Close()
3530
}
3631

3732
func initQ(url string) (*Pubsub, error) {

0 commit comments

Comments
 (0)