Commit 02e6f56b authored by Dawn Chen's avatar Dawn Chen

Merge pull request #19977 from brendandburns/deps

Update the docker/spdystream dependency
parents c3cab549 61ff7475
...@@ -394,7 +394,7 @@ ...@@ -394,7 +394,7 @@
}, },
{ {
"ImportPath": "github.com/docker/spdystream", "ImportPath": "github.com/docker/spdystream",
"Rev": "43bffc458d55aa784be658c9867fbefcfcb7fecf" "Rev": "c33989bcb56748d2473194d11f8ac3fc563688eb"
}, },
{ {
"ImportPath": "github.com/elazarl/go-bindata-assetfs", "ImportPath": "github.com/elazarl/go-bindata-assetfs",
......
...@@ -13,7 +13,7 @@ github.com/beorn7/perks/quantile | MIT? ...@@ -13,7 +13,7 @@ github.com/beorn7/perks/quantile | MIT?
github.com/blang/semver | MITname github.com/blang/semver | MITname
github.com/boltdb/bolt | MITname github.com/boltdb/bolt | MITname
github.com/bradfitz/http2 | BSDlikeRef github.com/bradfitz/http2 | BSDlikeRef
github.com/camlistore/camlistore/pkg/errorutil | Apache-2 github.com/camlistore/go4 | Apache-2
github.com/ClusterHQ/flocker-go | UNKNOWN github.com/ClusterHQ/flocker-go | UNKNOWN
github.com/codegangsta/negroni | MITname github.com/codegangsta/negroni | MITname
github.com/coreos/etcd | Apache-2 github.com/coreos/etcd | Apache-2
...@@ -29,7 +29,7 @@ github.com/daviddengcn/go-colortext | BSD? ...@@ -29,7 +29,7 @@ github.com/daviddengcn/go-colortext | BSD?
github.com/dgrijalva/jwt-go | spdxMIT github.com/dgrijalva/jwt-go | spdxMIT
github.com/docker/docker | Apache-2 github.com/docker/docker | Apache-2
github.com/docker/docker/pkg/symlink | spdxBSD3 github.com/docker/docker/pkg/symlink | spdxBSD3
github.com/docker/spdystream | Apache-2 github.com/docker/spdystream | SeeFile
github.com/elazarl/go-bindata-assetfs | spdxBSD2 github.com/elazarl/go-bindata-assetfs | spdxBSD2
github.com/elazarl/goproxy | BSDWarr github.com/elazarl/goproxy | BSDWarr
github.com/emicklei/go-restful | MITname github.com/emicklei/go-restful | MITname
...@@ -81,6 +81,7 @@ github.com/Sirupsen/logrus | MITname ...@@ -81,6 +81,7 @@ github.com/Sirupsen/logrus | MITname
github.com/skynetservices/skydns | MITname github.com/skynetservices/skydns | MITname
github.com/spf13/cobra | Apache-2 github.com/spf13/cobra | Apache-2
github.com/spf13/pflag | spdxBSD3 github.com/spf13/pflag | spdxBSD3
github.com/ssoroka/ttime | UNKNOWN
github.com/stretchr/objx | MIT? github.com/stretchr/objx | MIT?
github.com/stretchr/testify | MIT? github.com/stretchr/testify | MIT?
github.com/syndtr/gocapability | spdxBSD2 github.com/syndtr/gocapability | spdxBSD2
......
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
Copyright 2014 Docker, Inc. Copyright 2014-2015 Docker, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
......
Derek McGowan <derek@docker.com> (@dmcg) # Spdystream maintainers file
#
# This file describes who runs the docker/spdystream project and how.
# This is a living document - if you see something out of date or missing, speak up!
#
# It is structured to be consumable by both humans and programs.
# To extract its contents programmatically, use any TOML-compliant parser.
#
# This file is compiled into the MAINTAINERS file in docker/opensource.
#
[Org]
[Org."Core maintainers"]
people = [
"dmcgowan",
]
[people]
# A reference list of all people associated with the project.
# All other sections should refer to people by their canonical key
# in the people section.
# ADD YOURSELF HERE IN ALPHABETICAL ORDER
[people.dmcgowan]
Name = "Derek McGowan"
Email = "derek@docker.com"
GitHub = "dmcgowan"
...@@ -74,5 +74,4 @@ func main() { ...@@ -74,5 +74,4 @@ func main() {
## Copyright and license ## Copyright and license
Code and documentation copyright 2013-2014 Docker, inc. Code released under the Apache 2.0 license. Copyright © 2014-2015 Docker, Inc. All rights reserved, except as follows. Code is released under the Apache 2.0 license. The README.md file, and files in the "docs" folder are licensed under the Creative Commons Attribution 4.0 International License under the terms and conditions set forth in the file "LICENSE.docs". You may obtain a duplicate copy of the same license, titled CC-BY-SA-4.0, at http://creativecommons.org/licenses/by/4.0/.
Docs released under Creative commons.
...@@ -33,24 +33,28 @@ type idleAwareFramer struct { ...@@ -33,24 +33,28 @@ type idleAwareFramer struct {
conn *Connection conn *Connection
writeLock sync.Mutex writeLock sync.Mutex
resetChan chan struct{} resetChan chan struct{}
setTimeoutLock sync.Mutex
setTimeoutChan chan time.Duration setTimeoutChan chan time.Duration
timeout time.Duration timeout time.Duration
} }
func newIdleAwareFramer(framer *spdy.Framer) *idleAwareFramer { func newIdleAwareFramer(framer *spdy.Framer) *idleAwareFramer {
iaf := &idleAwareFramer{ iaf := &idleAwareFramer{
f: framer, f: framer,
resetChan: make(chan struct{}, 2), resetChan: make(chan struct{}, 2),
setTimeoutChan: make(chan time.Duration), // setTimeoutChan needs to be buffered to avoid deadlocks when calling setIdleTimeout at about
// the same time the connection is being closed
setTimeoutChan: make(chan time.Duration, 1),
} }
return iaf return iaf
} }
func (i *idleAwareFramer) monitor() { func (i *idleAwareFramer) monitor() {
var ( var (
timer *time.Timer timer *time.Timer
expired <-chan time.Time expired <-chan time.Time
resetChan = i.resetChan resetChan = i.resetChan
setTimeoutChan = i.setTimeoutChan
) )
Loop: Loop:
for { for {
...@@ -103,11 +107,21 @@ Loop: ...@@ -103,11 +107,21 @@ Loop:
} }
}() }()
go func() {
for _ = range setTimeoutChan {
}
}()
i.writeLock.Lock() i.writeLock.Lock()
close(resetChan) close(resetChan)
i.resetChan = nil i.resetChan = nil
i.writeLock.Unlock() i.writeLock.Unlock()
i.setTimeoutLock.Lock()
close(i.setTimeoutChan)
i.setTimeoutChan = nil
i.setTimeoutLock.Unlock()
break Loop break Loop
} }
} }
...@@ -148,6 +162,17 @@ func (i *idleAwareFramer) ReadFrame() (spdy.Frame, error) { ...@@ -148,6 +162,17 @@ func (i *idleAwareFramer) ReadFrame() (spdy.Frame, error) {
return frame, nil return frame, nil
} }
func (i *idleAwareFramer) setIdleTimeout(timeout time.Duration) {
i.setTimeoutLock.Lock()
defer i.setTimeoutLock.Unlock()
if i.setTimeoutChan == nil {
return
}
i.setTimeoutChan <- timeout
}
type Connection struct { type Connection struct {
conn net.Conn conn net.Conn
framer *idleAwareFramer framer *idleAwareFramer
...@@ -794,7 +819,7 @@ func (s *Connection) SetCloseTimeout(timeout time.Duration) { ...@@ -794,7 +819,7 @@ func (s *Connection) SetCloseTimeout(timeout time.Duration) {
// SetIdleTimeout sets the amount of time the connection may sit idle before // SetIdleTimeout sets the amount of time the connection may sit idle before
// it is forcefully terminated. // it is forcefully terminated.
func (s *Connection) SetIdleTimeout(timeout time.Duration) { func (s *Connection) SetIdleTimeout(timeout time.Duration) {
s.framer.setTimeoutChan <- timeout s.framer.setIdleTimeout(timeout)
} }
func (s *Connection) sendHeaders(headers http.Header, stream *Stream, fin bool) error { func (s *Connection) sendHeaders(headers http.Header, stream *Stream, fin bool) error {
......
...@@ -322,6 +322,5 @@ func (s *Stream) closeRemoteChannels() { ...@@ -322,6 +322,5 @@ func (s *Stream) closeRemoteChannels() {
close(s.closeChan) close(s.closeChan)
s.dataLock.Lock() s.dataLock.Lock()
defer s.dataLock.Unlock() defer s.dataLock.Unlock()
close(s.dataChan)
} }
} }
Copyright (c) 2012 - 2013 Mat Ryer and Tyler Bunnell
Please consider promoting this project if you find it useful.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
...@@ -41,4 +41,5 @@ exec docker run --rm -i -v "${KUBE_ROOT}:/repo" mesosphere/godep-licenses:latest ...@@ -41,4 +41,5 @@ exec docker run --rm -i -v "${KUBE_ROOT}:/repo" mesosphere/godep-licenses:latest
-e github.com/spf13/cobra:Apache-2 \ -e github.com/spf13/cobra:Apache-2 \
-e github.com/stretchr/objx:MIT? \ -e github.com/stretchr/objx:MIT? \
-e github.com/stretchr/testify:MIT? \ -e github.com/stretchr/testify:MIT? \
-e github.com/docker/spdystream:SeeFile \
-o md > Godeps/LICENSES.md -o md > Godeps/LICENSES.md
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment