File tree Expand file tree Collapse file tree 3 files changed +4
-27
lines changed Expand file tree Collapse file tree 3 files changed +4
-27
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,4 @@ module github.com/arduino/pluggable-monitor-protocol-handler
22
33go 1.16
44
5- require (
6- github.com/arduino/go-properties-orderedmap v1.4.0
7- github.com/hashicorp/go-multierror v1.1.1
8- )
5+ require github.com/hashicorp/go-multierror v1.1.1
Original file line number Diff line number Diff line change 1- github.com/arduino/go-paths-helper v1.0.1 h1:utYXLM2RfFlc9qp/MJTIYp3t6ux/xM6mWjeEb/WLK4Q =
2- github.com/arduino/go-paths-helper v1.0.1 /go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck =
3- github.com/arduino/go-properties-orderedmap v1.4.0 h1:YEbbzPqm1gXWDM/Jaq8tlvmh09z2qeHPJTUw9/VA4Dk =
4- github.com/arduino/go-properties-orderedmap v1.4.0 /go.mod h1:DKjD2VXY/NZmlingh4lSFMEYCVubfeArCsGPGDwb2yk =
5- github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8 =
6- github.com/davecgh/go-spew v1.1.0 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
71github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA =
82github.com/hashicorp/errwrap v1.0.0 /go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4 =
93github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo =
104github.com/hashicorp/go-multierror v1.1.1 /go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM =
11- github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM =
12- github.com/pmezard/go-difflib v1.0.0 /go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4 =
13- github.com/stretchr/objx v0.1.0 /go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME =
14- github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q =
15- github.com/stretchr/testify v1.3.0 /go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI =
Original file line number Diff line number Diff line change @@ -37,19 +37,9 @@ import (
3737 "strings"
3838 "sync"
3939
40- "github.com/arduino/go-properties-orderedmap"
4140 "github.com/hashicorp/go-multierror"
4241)
4342
44- // Port is a descriptor for a board port
45- type Port struct {
46- Address string `json:"address"`
47- AddressLabel string `json:"label,omitempty"`
48- Protocol string `json:"protocol,omitempty"`
49- ProtocolLabel string `json:"protocolLabel,omitempty"`
50- Properties * properties.Map `json:"properties,omitempty"`
51- }
52-
5343// Monitor is an interface that represents the business logic that
5444// a pluggable monitor must implement. The communication protocol
5545// is completely hidden and it's handled by a MonitorServer.
@@ -262,8 +252,9 @@ func (d *Server) close(messageErr string) {
262252 d .closeFuncMutex .Lock ()
263253 defer d .closeFuncMutex .Unlock ()
264254 if d .clientConn == nil {
265- // TODO
266- // d.outputChan <- messageError("close", "port already closed")
255+ if messageErr == "" {
256+ d .outputChan <- messageError ("close" , "port already closed" )
257+ }
267258 return
268259 }
269260 connErr := d .clientConn .Close ()
You can’t perform that action at this time.
0 commit comments