This commit is contained in:
iamqizhao 2015-04-15 15:42:15 -07:00
Родитель 3130172948
Коммит d52d8e2d40
2 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -145,7 +145,7 @@ func NewClientTLSFromFile(certFile, serverName string) (TransportAuthenticator,
// NewServerTLSFromCert constructs a TLS from the input certificate for server.
func NewServerTLSFromCert(cert *tls.Certificate) TransportAuthenticator {
return NewTLS(&tls.Config{ Certificates: []tls.Certificate{*cert} })
return NewTLS(&tls.Config{Certificates: []tls.Certificate{*cert}})
}
// NewServerTLSFromFile constructs a TLS from the input certificate file and key
@ -155,7 +155,7 @@ func NewServerTLSFromFile(certFile, keyFile string) (TransportAuthenticator, err
if err != nil {
return nil, err
}
return NewTLS(&tls.Config{ Certificates: []tls.Certificate{cert} }), nil
return NewTLS(&tls.Config{Certificates: []tls.Certificate{cert}}), nil
}
// TokenSource supplies credentials from an oauth2.TokenSource.

Просмотреть файл

@ -479,13 +479,13 @@ func (t *http2Client) getStream(f http2.Frame) (*Stream, bool) {
// Window updates will deliver to the controller for sending when
// the cumulative quota exceeds the corresponding threshold.
func (t *http2Client) updateWindow(s *Stream, n uint32) {
swu, cwu := s.fc.onRead(n)
if swu > 0 {
t.controlBuf.put(&windowUpdate{s.id, swu})
}
if cwu > 0 {
t.controlBuf.put(&windowUpdate{0, cwu})
}
swu, cwu := s.fc.onRead(n)
if swu > 0 {
t.controlBuf.put(&windowUpdate{s.id, swu})
}
if cwu > 0 {
t.controlBuf.put(&windowUpdate{0, cwu})
}
}
func (t *http2Client) handleData(f *http2.DataFrame) {