-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only log when TransportLimits actually changed #1183
base: master
Are you sure you want to change the base?
Conversation
need rebase too |
57aff7e
to
e78417e
Compare
@oroulet Rebased. |
7b480a6
to
00bf33a
Compare
max_recv_buffer = ack.ReceiveBufferSize if role == "client" else ack.SendBufferSize | ||
max_send_buffer = ack.SendBufferSize if role == "client" else ack.ReceiveBufferSize | ||
|
||
new_limits = TransportLimits( | ||
max_chunk_count=ack.MaxChunkCount, | ||
max_recv_buffer=max_recv_buffer, | ||
max_send_buffer=max_send_buffer, | ||
max_message_size=ack.MaxMessageSize, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm now not sure if it makes sense to create the new_limits
here or if we should keep this in the other methods, since it differs between client and server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry That MR disapeard into the backlog.. but yes inline would be better I think
@@ -51,17 +52,30 @@ def is_chunk_count_within_limit(self, sz: int) -> bool: | |||
_logger.error("Number of message chunks: %s is > configured max chunk count: %s", sz, self.max_chunk_count) | |||
return within_limit | |||
|
|||
def _set_new_limits_from_ack(self, ack: ua.Acknowledge, role: Literal["client", "server"]) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you really need that Role, it should be an enum.
But in that case I would jsut create two methods, one for server and one for client. That is simpler
Based on #1181