parent
b27dec8b94
commit
57908723f4
|
@ -111,7 +111,7 @@ func (l *tlsKeepaliveListener) Accept() (c net.Conn, err error) {
|
||||||
return c, nil
|
return c, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewListener creates a Listener which accepts connections from an inner
|
// newTLSKeepaliveListener creates a Listener which accepts connections from an inner
|
||||||
// Listener and wraps each connection with Server.
|
// Listener and wraps each connection with Server.
|
||||||
// The configuration config must be non-nil and must have
|
// The configuration config must be non-nil and must have
|
||||||
// at least one certificate.
|
// at least one certificate.
|
||||||
|
|
|
@ -63,7 +63,7 @@ func (rwm *RWMutex) Lock() error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// waitOnLowest will wait on the last key with a revision < rwm.myKey.Revision with a
|
// waitOnLastRev will wait on the last key with a revision < rwm.myKey.Revision with a
|
||||||
// given prefix. If there are no keys left to wait on, return true.
|
// given prefix. If there are no keys left to wait on, return true.
|
||||||
func (rwm *RWMutex) waitOnLastRev(pfx string) (bool, error) {
|
func (rwm *RWMutex) waitOnLastRev(pfx string) (bool, error) {
|
||||||
client := rwm.s.Client()
|
client := rwm.s.Client()
|
||||||
|
|
|
@ -56,7 +56,7 @@ func (l *Lease) TTL() int64 {
|
||||||
return l.ttl
|
return l.ttl
|
||||||
}
|
}
|
||||||
|
|
||||||
// RemainingTTL returns the last checkpointed remaining TTL of the lease.
|
// getRemainingTTL returns the last checkpointed remaining TTL of the lease.
|
||||||
func (l *Lease) getRemainingTTL() int64 {
|
func (l *Lease) getRemainingTTL() int64 {
|
||||||
if l.remainingTTL > 0 {
|
if l.remainingTTL > 0 {
|
||||||
return l.remainingTTL
|
return l.remainingTTL
|
||||||
|
|
Loading…
Reference in New Issue