Skip to content
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

Make sure that all bytes are sent to the ANCP neighbor #10

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ancp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def _send_adjac(self, m, code):
log.debug("send adjanecy message with code %s", (code))
b = self._mkadjac(MessageType.ADJACENCY, self.timer * 10, m, code)
with self._tx_lock:
self.socket.send(b)
self.socket.sendall(b)

def _send_syn(self):
self._send_adjac(0, MessageCode.SYN)
Expand Down Expand Up @@ -417,4 +417,4 @@ def _send_port_updwn(self, message_type, tech_type, subscribers):
if len(msg) == 0:
raise ValueError("No valid Subscriber passed")
with self._tx_lock:
self.socket.send(msg)
self.socket.sendall(msg)
2 changes: 1 addition & 1 deletion tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _rx(b):
def tx(msg):
client._tx_bytes += msg

client.socket.send = tx
client.socket.sendall = tx
return client


Expand Down
Loading