修复线程不能正确关闭的问题
This commit is contained in:
@@ -46,8 +46,10 @@ public class RemoteTCPConnection extends TCPConnection {
|
||||
|
||||
public void sendBlock(KLALBBlock data) throws IOException {
|
||||
dout.writeLong(data.sn);
|
||||
if(data.sn!=0) {
|
||||
dout.writeLong(data.cuid.getMostSignificantBits());
|
||||
dout.writeLong(data.cuid.getLeastSignificantBits());
|
||||
}
|
||||
dout.writeLong(data.number);
|
||||
if (data.number > 0) {
|
||||
if (data.data == null) {
|
||||
@@ -80,7 +82,11 @@ public class RemoteTCPConnection extends TCPConnection {
|
||||
public KLALBBlock receiveBlock() throws IOException {
|
||||
KLALBBlock klb = new KLALBBlock();
|
||||
klb.sn = din.readLong();
|
||||
if(klb.sn!=0) {
|
||||
klb.cuid = new UUID(din.readLong(), din.readLong());
|
||||
}else {
|
||||
klb.cuid=new UUID(0,0);
|
||||
}
|
||||
klb.number = din.readLong();
|
||||
if (klb.number > 0) {
|
||||
int size = din.readInt();
|
||||
|
||||
Reference in New Issue
Block a user