Skip to content

Commit

Permalink
Merge pull request #114 from icgood/swim-errors
Browse files Browse the repository at this point in the history
Show SWIM UDP errors
  • Loading branch information
icgood committed May 15, 2021
2 parents 029e2a4 + f77ed88 commit 5f1bdf4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 0 additions & 1 deletion .lvimrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
let g:ale_fix_on_save = 1
let g:ale_fixers = {
\ 'python': ['autopep8'],
\}
8 changes: 7 additions & 1 deletion pymap/cluster/swim.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,20 @@ def _local_update(self, members: Members,
async def _start(self, args: Namespace, stack: AsyncExitStack) -> None:
while True:
try:
config = transport_type.config_type.from_args(args)
config = transport_type.config_type.from_args(
args, ping_interval=10.0,
ping_timeout=1.0,
suspect_timeout=300.0,
sync_interval=30.0)
except TransientConfigError as exc:
_log.debug('SWIM configuration failure: %s', exc)
await asyncio.sleep(exc.wait_hint)
except ConfigError:
return # do not run SWIM if not configured properly
else:
break
_log.debug('SWIM configuration: %r %r',
config.local_name, config.peers)

transport = transport_type(config)
members = Members(config)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
license = f.read()

setup(name='pymap',
version='0.24.5',
version='0.24.6',
author='Ian Good',
author_email='ian@icgood.net',
description='Lightweight, asynchronous IMAP serving in Python.',
Expand Down Expand Up @@ -56,7 +56,7 @@
'macaroon': ['pymacaroons'],
'redis': ['aioredis ~= 1.3.1', 'msgpack ~= 1.0'],
'sieve': ['sievelib'],
'swim': ['swim-protocol ~= 0.3.6'],
'swim': ['swim-protocol ~= 0.3.8'],
'systemd': ['systemd-python'],
'optional': ['hiredis', 'passlib', 'pid']},
entry_points={
Expand Down

0 comments on commit 5f1bdf4

Please sign in to comment.