diff --git a/README.md b/README.md index 491c42db..0359e027 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Go Micro [![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Go.Dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/micro/go-micro?tab=doc) [![Travis CI](https://api.travis-ci.org/micro/go-micro.svg?branch=master)](https://travis-ci.org/micro/go-micro) [![Go Report Card](https://goreportcard.com/badge/micro/go-micro)](https://goreportcard.com/report/github.com/micro/go-micro) +# Go Micro [![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Go.Dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/micro/go-micro?tab=doc) [![Travis CI](https://api.travis-ci.org/micro/go-micro.svg?branch=master)](https://travis-ci.org/micro/go-micro) [![Go Report Card](https://goreportcard.com/badge/micro/go-micro)](https://goreportcard.com/report/github.com/micro/go-micro) Slack Widget Go Micro is a framework for distributed systems development. diff --git a/client/rpc_stream.go b/client/rpc_stream.go index 7c880d88..426aafc4 100644 --- a/client/rpc_stream.go +++ b/client/rpc_stream.go @@ -130,15 +130,15 @@ func (r *rpcStream) Error() error { } func (r *rpcStream) Close() error { - r.RLock() + r.Lock() select { case <-r.closed: - r.RUnlock() + r.Unlock() return nil default: close(r.closed) - r.RUnlock() + r.Unlock() // send the end of stream message if r.sendEOS {