Skip to content

Commit

Permalink
Don't block when sending readings to g.RPCReadingChan
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissnell committed Oct 22, 2017
1 parent 7edbfe2 commit 041f007
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
config-secret.yaml
gopherwx
binaries/
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions storage_grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net"
"sync"

weather "github.com/chrissnell/gopherwx/grpcweather"
weather "github.com/chrissnell/gopherwx/protobuf"
"github.com/golang/protobuf/ptypes"
"google.golang.org/grpc"
"google.golang.org/grpc/reflection"
Expand Down Expand Up @@ -60,7 +60,7 @@ func (g GRPCStorage) processMetrics(ctx context.Context, wg *sync.WaitGroup, rch
func (g GRPCStorage) SendReading(r Reading) error {
select {
case g.RPCReadingChan <- r:
//
default:
}

return nil
Expand Down

0 comments on commit 041f007

Please sign in to comment.