Skip to content

Commit

Permalink
fixing issue goburrow#88
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea committed Nov 27, 2022
1 parent 606c02f commit e631766
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rtuclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ type rtuSerialTransporter struct {
}

func (mb *rtuSerialTransporter) Send(aduRequest []byte) (aduResponse []byte, err error) {
mb.mu.Lock()
defer mb.mu.Unlock()

// Make sure port is connected
if err = mb.serialPort.connect(); err != nil {
return
Expand Down

0 comments on commit e631766

Please sign in to comment.