We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cb4923 commit 4175740Copy full SHA for 4175740
x/mongo/driver/topology/connection.go
@@ -431,11 +431,8 @@ func (c *Connection) Close() error {
431
defer c.s.sem.Release(1)
432
}
433
err := c.pool.put(c.connection)
434
- if err != nil {
435
- return err
436
- }
437
c.connection = nil
438
- return nil
+ return err
439
440
441
// Expire closes this connection and will closeConnection the underlying socket.
@@ -449,11 +446,8 @@ func (c *Connection) Expire() error {
449
446
c.s.sem.Release(1)
450
447
451
448
err := c.close()
452
453
454
455
456
457
458
459
// Alive returns if the connection is still alive.
0 commit comments