Skip to content

Commit

Permalink
Don't prematurely increment send seq on ack error (fixes #146)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmalinowsky committed Jan 27, 2025
1 parent 28e256c commit e21fa7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/io/calimero/knxnetip/ClientConnection.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Calimero 2 - A library for KNX network access
Copyright (c) 2010, 2024 B. Malinowsky
Copyright (c) 2010, 2025 B. Malinowsky
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -418,7 +418,8 @@ else if (svc == serviceAck) {
else {
if (!checkVersion(h))
return true;
incSeqSend();
if (res.getStatus() == ErrorCodes.NO_ERROR)
incSeqSend();
// update state and notify our lock
setStateNotify(res.getStatus() == ErrorCodes.NO_ERROR ? CEMI_CON_PENDING : ACK_ERROR);
logger.log(TRACE, "received service ack {0} from {1} (channel {2})",
Expand Down

0 comments on commit e21fa7e

Please sign in to comment.