Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions connector/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ type SSHConnection struct {

// RunCommand runs a command against the device
func (c *SSHConnection) RunCommand(cmd string) ([]byte, error) {
c.mu.Lock()
defer c.mu.Unlock()
// c.mu.Lock()
// defer c.mu.Unlock()

if c.client == nil {
return nil, errors.New("not connected")
Expand Down
4 changes: 2 additions & 2 deletions connector/connection_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ func NewConnectionManager(opts ...Option) *SSHConnectionManager {

// Connect connects to a device or returns an long living connection
func (m *SSHConnectionManager) Connect(device *Device) (*SSHConnection, error) {
m.mu.Lock()
defer m.mu.Unlock()
// m.mu.Lock()
// defer m.mu.Unlock()

if connection, found := m.connections[device.Host]; found {
if !connection.isConnected() {
Expand Down