Skip to content

Commit d158aee

Browse files
authored
Merge pull request #47 from icgood/uid
The reader callback should randomize unique_id
2 parents 3d85e9b + 41b50ee commit d158aee

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

proxyprotocol/reader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from functools import partial
77
from typing import Any, Awaitable, Callable, Coroutine, Union
88
from typing_extensions import Final, TypeAlias
9+
from uuid import uuid4
910

1011
from . import ProxyProtocol, ProxyProtocolIncompleteError, \
1112
ProxyProtocolWantRead
@@ -87,5 +88,5 @@ async def _read_then_call(self, callback: _WrappedCallback,
8788
except Exception as exc:
8889
writer.close()
8990
result = ProxyResultUnknown(exc)
90-
sock_info = SocketInfo.get(writer, result)
91+
sock_info = SocketInfo.get(writer, result, unique_id=uuid4().bytes)
9192
asyncio.create_task(callback(reader, writer, sock_info))

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ build-backend = 'hatchling.build'
2525

2626
[project]
2727
name = 'proxy-protocol'
28-
version = '0.10.0'
28+
version = '0.10.1'
2929
authors = [
3030
{ name = 'Ian Good', email = 'ian@icgood.net' },
3131
]

0 commit comments

Comments
 (0)