Files
nomad/drivers
Michael Schurter c9fe5d26b3 plugins: squelch context Canceled error logs
As far as I can tell this is the most straightforward and resilient way
to skip error logging on context cancellation with grpc streams. You
cannot compare the error against context.Canceled directly as it is of
type `*status.statusError`. The next best solution I found was:

```go
resp, err := stream.Recv()
if code, ok := err.(interface{ Code() code.Code }); ok {
	if code.Code == code.Canceled {
		return
	}
}
```

However I think checking ctx.Err() directly makes the code much easier
to read and is resilient against grpc API changes.
2019-02-21 15:32:18 -08:00
..
2019-02-20 08:21:03 -05:00
2019-02-20 08:21:03 -05:00
2019-01-23 06:27:14 -08:00
2019-02-20 08:21:03 -05:00