aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkg/goexec/smb/client.go20
1 files changed, 11 insertions, 9 deletions
diff --git a/pkg/goexec/smb/client.go b/pkg/goexec/smb/client.go
index 384f4bc..35fe5c8 100644
--- a/pkg/goexec/smb/client.go
+++ b/pkg/goexec/smb/client.go
@@ -80,15 +80,17 @@ func (c *Client) Close(ctx context.Context) (err error) {
log := c.Logger(ctx)
- // Close TCP connection
- if c.conn != nil {
- defer func() {
- if err = c.conn.Close(); err != nil {
- log.Debug().Err(err).Msgf("Failed to close %s connection", c.String())
- }
- log.Debug().Msgf("Closed %s connection", c.String())
- }()
- }
+ // Close TCP connection - Not needed?
+ /*
+ if c.conn != nil {
+ defer func() {
+ if err = c.conn.Close(); err != nil {
+ log.Debug().Err(err).Msgf("Failed to close %s connection", c.String())
+ }
+ log.Debug().Msgf("Closed %s connection", c.String())
+ }()
+ }
+ */
// Close SMB session
if c.sess != nil {