summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHervé Beraud <hberaud@redhat.com>2021-07-05 21:51:41 +0200
committerGitHub <noreply@github.com>2021-07-05 12:51:41 -0700
commitd2ef655746cea8032fd6bd99dd21cc9658df56cd (patch)
treeed7102589646dde09f176f26cd0d76689740d70e
parent5a8535dccd877495e28b4e78d0c25499fd72cd4d (diff)
downloadpymemcache-d2ef655746cea8032fd6bd99dd21cc9658df56cd.tar.gz
Fix doc rendering (#339)
-rw-r--r--pymemcache/client/base.py24
1 files changed, 10 insertions, 14 deletions
diff --git a/pymemcache/client/base.py b/pymemcache/client/base.py
index 64f65d7..8602678 100644
--- a/pymemcache/client/base.py
+++ b/pymemcache/client/base.py
@@ -148,24 +148,20 @@ class KeepaliveOpts(object):
This structure must be passed to a client. The client will configure
its socket keepalive by using the elements of the structure.
+
+ Args:
+ idle: The time (in seconds) the connection needs to remain idle
+ before TCP starts sending keepalive probes. Should be a positive
+ integer most greater than zero.
+ intvl: The time (in seconds) between individual keepalive probes.
+ Should be a positive integer most greater than zero.
+ cnt: The maximum number of keepalive probes TCP should send before
+ dropping the connection. Should be a positive integer most greater
+ than zero.
"""
__slots__ = ('idle', 'intvl', 'cnt')
def __init__(self, idle=1, intvl=1, cnt=5):
- """
- Constructor.
-
- Args:
- idle: The time (in seconds) the connection needs to remain idle
- before TCP starts sending keepalive probes. Should be a positive
- integer most greater than zero.
- intvl: The time (in seconds) between individual keepalive probes.
- Should be a positive integer most greater than zero.
- cnt: The maximum number of keepalive probes TCP should send before
- dropping the connection. Should be a positive integer most greater
- than zero.
- """
-
if idle < 1:
raise ValueError(
"The idle parameter must be greater or equal to 1.")