mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 14:14:39 +00:00
Fix deadlock in nettest webserver
This commit is contained in:
@@ -12,13 +12,13 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
TAG = 1.6
|
TAG = 1.7
|
||||||
PREFIX = gcr.io/google_containers
|
PREFIX = gcr.io/google_containers
|
||||||
|
|
||||||
all: push
|
all: push
|
||||||
|
|
||||||
webserver: webserver.go
|
webserver: webserver.go
|
||||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./webserver.go
|
CGO_ENABLED=0 GOOS=linux godep go build -a -installsuffix cgo -ldflags '-w' ./webserver.go
|
||||||
|
|
||||||
container: image
|
container: image
|
||||||
|
|
||||||
|
@@ -90,7 +90,8 @@ func (s *State) serveStatus(w http.ResponseWriter, r *http.Request) {
|
|||||||
fmt.Fprintf(w, "running")
|
fmt.Fprintf(w, "running")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
s.Logf("Declaring failure for %s/%s with %d sent and %d received and %d peers", *namespace, *service, len(s.Sent), len(s.Received), *peerCount)
|
// Logf can't be called while holding the lock, so defer using a goroutine
|
||||||
|
go s.Logf("Declaring failure for %s/%s with %d sent and %d received and %d peers", *namespace, *service, len(s.Sent), len(s.Received), *peerCount)
|
||||||
fmt.Fprintf(w, "fail")
|
fmt.Fprintf(w, "fail")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user