Skip to content

Commit 7afdc38

Browse files
authored
Monitor gRPC now sends a 'success' message to notify open port (#1742)
1 parent d5df436 commit 7afdc38

File tree

3 files changed

+57
-40
lines changed

3 files changed

+57
-40
lines changed

Diff for: commands/daemon/daemon.go

+3
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,9 @@ func (s *ArduinoCoreServerImpl) Monitor(stream rpc.ArduinoCoreService_MonitorSer
509509
return err
510510
}
511511

512+
// Send a message with Success set to true to notify the caller of the port being now active
513+
_ = stream.Send(&rpc.MonitorResponse{Success: true})
514+
512515
go func() {
513516
// close port on gRPC call EOF or errors
514517
defer portProxy.Close()

Diff for: rpc/cc/arduino/cli/commands/v1/monitor.pb.go

+51-40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: rpc/cc/arduino/cli/commands/v1/monitor.proto

+3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ message MonitorResponse {
5151
// report the default settings) or after a new port_configuration is sent
5252
// (to report the new settings applied)
5353
repeated MonitorPortSetting applied_settings = 3;
54+
// A message with this field set to true is sent as soon as the port is
55+
// succesfully opened
56+
bool success = 4;
5457
}
5558

5659
message MonitorPortSetting {

0 commit comments

Comments
 (0)