Skip to content

Commit

Permalink
Fixed segfault in SendLocal()
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicletz committed Aug 24, 2021
1 parent 7201f62 commit 7f7569d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rpc/connectedport.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ func (port *ConnectedPort) SendLocal(data []byte) (err error) {
}
conn = port.Conn
})
if err != nil {
port.Close()
return
}
_, err = conn.Write(data)
if err != nil {
port.Close()
Expand Down

0 comments on commit 7f7569d

Please sign in to comment.