commit | 139e6512c0eea676cd43ad529cca520831d5fdf1 | [log] [tgz] |
---|---|---|
author | Shyam Jayaraman <bjornick@google.com> | Mon Jun 09 17:43:10 2014 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Mon Jun 09 17:43:10 2014 +0000 |
tree | 7746e855cffd5e77b98a644b8bde4f9b806b157a | |
parent | 3db40a12e6918c970c8edc486d2f85efd964cb1a [diff] | |
parent | 717eaad5f22bd59858a77cabcd3a07ee101b2987 [diff] |
Merge "veyron/services/wspr: Lock around publish calls, so Listen doesn't get called multiple times."
diff --git a/services/wspr/wsprd/lib/server.go b/services/wspr/wsprd/lib/server.go index 035f635..1ff9a32 100644 --- a/services/wspr/wsprd/lib/server.go +++ b/services/wspr/wsprd/lib/server.go
@@ -162,6 +162,8 @@ } func (s *server) publish(name string) (string, error) { + s.Lock() + defer s.Unlock() if s.endpoint == "" { endpoint, err := s.server.Listen("veyron", s.veyronProxy)