Skip to content

Commit 50a212f

Browse files
committed
Remove unncessary newConnection function
1 parent 5331585 commit 50a212f

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

amqp.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -178,17 +178,6 @@ func New(url url.URL) *Session {
178178
return &session
179179
}
180180

181-
// newConnection will close the current connection, cleaning
182-
// up the go-routines and connections. Then attempt to reconnect
183-
func (session *Session) newConnection(url url.URL) {
184-
err := session.Close()
185-
if err != nil {
186-
log.Errorln("Failed to close session:", err)
187-
}
188-
session.url = url
189-
go session.handleReconnect()
190-
}
191-
192181
// handleReconnect will wait for a connection error on
193182
// notifyConnClose, and then continuously attempt to reconnect.
194183
func (session *Session) handleReconnect() {

0 commit comments

Comments
 (0)