diff options
author | Bryan McNulty <bryanmcnulty@protonmail.com> | 2025-04-17 02:09:50 -0500 |
---|---|---|
committer | Bryan McNulty <bryanmcnulty@protonmail.com> | 2025-04-17 02:09:50 -0500 |
commit | 5f0928b65e1e1c2a92818ecea0eb81aa547f4a95 (patch) | |
tree | ba91a1bdbc1f9839aa3b53a3c6ab5ad17f02d359 /pkg | |
parent | cdc0205d036c78e8ce1c27e8dd4f71542959f889 (diff) | |
download | goexec-5f0928b65e1e1c2a92818ecea0eb81aa547f4a95.tar.gz goexec-5f0928b65e1e1c2a92818ecea0eb81aa547f4a95.zip |
Fix connection error with smb2 - remove Close()
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/goexec/smb/client.go | 20 |
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 { |