Fix the proxy watcher
This commit is contained in:
@@ -357,7 +357,9 @@ func (s *svc) Watch(opts ...router.WatchOption) (router.Watcher, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var options router.WatchOptions
|
||||
options := router.WatchOptions{
|
||||
Service: "*",
|
||||
}
|
||||
for _, o := range opts {
|
||||
o(&options)
|
||||
}
|
||||
|
@@ -70,11 +70,9 @@ func (w *watcher) watch(stream pb.Router_WatchService) error {
|
||||
Route: route,
|
||||
}
|
||||
|
||||
for {
|
||||
select {
|
||||
case w.resChan <- event:
|
||||
case <-w.done:
|
||||
}
|
||||
select {
|
||||
case w.resChan <- event:
|
||||
case <-w.done:
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user