diff -Nru etcd-2.2.5+dfsg/debian/changelog etcd-2.2.5+dfsg/debian/changelog --- etcd-2.2.5+dfsg/debian/changelog 2016-02-12 00:24:00.000000000 +0000 +++ etcd-2.2.5+dfsg/debian/changelog 2016-09-07 04:16:09.000000000 +0000 @@ -1,3 +1,9 @@ +etcd (2.2.5+dfsg-1ubuntu1) xenial; urgency=medium + + * Fix race on getting close notifier channel (Closes: GH5269). + + -- Hui Xiang Wed, 07 Sep 2016 03:55:36 +0000 + etcd (2.2.5+dfsg-1) unstable; urgency=medium * New upstream release [February 2016] (Closes: #814404). diff -Nru etcd-2.2.5+dfsg/debian/patches/fix-race-on-getting-close-notifier-channel.patch etcd-2.2.5+dfsg/debian/patches/fix-race-on-getting-close-notifier-channel.patch --- etcd-2.2.5+dfsg/debian/patches/fix-race-on-getting-close-notifier-channel.patch 1970-01-01 00:00:00.000000000 +0000 +++ etcd-2.2.5+dfsg/debian/patches/fix-race-on-getting-close-notifier-channel.patch 2016-09-07 03:54:08.000000000 +0000 @@ -0,0 +1,14 @@ +--- etcd-2.2.5+dfsg.orig/proxy/reverse.go ++++ etcd-2.2.5+dfsg/proxy/reverse.go +@@ -102,9 +102,10 @@ func (p *reverseProxy) ServeHTTP(rw http + closeNotifier, ok := rw.(http.CloseNotifier) + cancel := httputil.RequestCanceler(p.transport, proxyreq) + if ok { ++ closeCh := closeNotifier.CloseNotify() + go func() { + select { +- case <-closeNotifier.CloseNotify(): ++ case <-closeCh: + atomic.StoreInt32(&requestClosed, 1) + log.Printf("proxy: client %v closed request prematurely", clientreq.RemoteAddr) + cancel() diff -Nru etcd-2.2.5+dfsg/debian/patches/series etcd-2.2.5+dfsg/debian/patches/series --- etcd-2.2.5+dfsg/debian/patches/series 2016-02-06 07:18:50.000000000 +0000 +++ etcd-2.2.5+dfsg/debian/patches/series 2016-09-07 03:51:01.000000000 +0000 @@ -1 +1,2 @@ rakyll2cheggaaa.patch +fix-race-on-getting-close-notifier-channel.patch