Update to 0.0.2
This commit is contained in:
parent
a99c3fba70
commit
886cd1d321
@ -1,5 +1,5 @@
|
|||||||
Manifest-Version: 1.0
|
Manifest-Version: 1.0
|
||||||
Main-Class: com.captainalm.test.calmnet.Main
|
Main-Class: com.captainalm.test.calmnet.Main
|
||||||
Class-Path: calmnetlib-0.0.1.jar calmstdcrypt-0.0.1.jar calmnetlib.jar c
|
Class-Path: calmnetlib-0.1.0.jar calmnetlib-0.0.1.jar calmstdcrypt-0.0.1
|
||||||
almstdcrypt.jar
|
.jar calmnetlib.jar calmstdcrypt.jar
|
||||||
|
|
||||||
|
@ -298,6 +298,7 @@ public final class Main {
|
|||||||
if (!packet.isValid()) continue;
|
if (!packet.isValid()) continue;
|
||||||
if (packet instanceof AKNPacket) {
|
if (packet instanceof AKNPacket) {
|
||||||
synchronized (slockAckned) {
|
synchronized (slockAckned) {
|
||||||
|
//System.out.println(Thread.currentThread().getName() + " : AKN");
|
||||||
ackn = true;
|
ackn = true;
|
||||||
slockAckned.notifyAll();
|
slockAckned.notifyAll();
|
||||||
}
|
}
|
||||||
@ -428,6 +429,8 @@ public final class Main {
|
|||||||
private static void doAKNWait(IPacket packet) {
|
private static void doAKNWait(IPacket packet) {
|
||||||
ackn = false;
|
ackn = false;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
try {
|
||||||
|
synchronized (slockAckned) {
|
||||||
while (++i <= sendLoopsRemainingSetting && !ackn) {
|
while (++i <= sendLoopsRemainingSetting && !ackn) {
|
||||||
try {
|
try {
|
||||||
if (server != null) {
|
if (server != null) {
|
||||||
@ -439,12 +442,12 @@ public final class Main {
|
|||||||
} catch (IOException | PacketException e) {
|
} catch (IOException | PacketException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
try {
|
if (ackn) break;
|
||||||
synchronized (slockAckned) {
|
//System.out.println(Thread.currentThread().getName() + " : " + (i - 1));
|
||||||
slockAckned.wait(sendLoopWaitTime);
|
slockAckned.wait(sendLoopWaitTime);
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
|
||||||
}
|
}
|
||||||
|
} catch (InterruptedException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user