back_recharge
mashiyu 2019-01-22 18:55:33 +08:00
parent 34bcd18e8d
commit c28ba0913e
5 changed files with 29 additions and 6 deletions

View File

@ -8,6 +8,7 @@ version '1.0.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
}

View File

@ -8,6 +8,7 @@ version '1.0.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
}
@ -16,6 +17,8 @@ dependencies {
}
jar {
baseName = 'hotfix'
version = '1.0.0'
manifest{
attributes 'Manifest-Version':'1.0'
attributes 'Premain-Class':'com.ljsd.jieling.hotfix.JavaAgent'

View File

@ -8,6 +8,7 @@ version '1.0.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
}

View File

@ -36,4 +36,21 @@ jar {
manifest {
attributes 'Main-Class': 'com.ljsd.jieling.ServerlogicApplication'
}
}
//JAR
task taskJar(type:Jar, dependsOn: compileJava) {
from 'build/classes/main'
destinationDir = file('build/libs')
}
//libjar
task clearJars(type:Delete){
delete 'lib'
}
task copyJars(type: Copy, dependsOn:clearJars) {
from configurations.runtime
into 'lib' //
}

View File

@ -256,6 +256,13 @@ public class ProtocolsManager implements ProtocolsAbstract {
private int checkAndRefresh(ISession session, PacketNetData packetNetData) {
int myToken = 0;
if (packetNetData.getMsgId()== MessageTypeProto.MessageType.LOGIN_REQUEST_VALUE){
if (OnlineUserManager.checkUidOnline(session.getUid())){
ISession iSession = OnlineUserManager.getSessionByUid(session.getUid());
MessageUtil.sendErrorCode(session, ErrorCode.reloginCode);
OnlineUserManager.userOffline(iSession.getUid());
iSession.close();
}
OnlineUserManager.userOnline(session.getUid(),session);
//TODO 更新token
@ -266,12 +273,6 @@ public class ProtocolsManager implements ProtocolsAbstract {
}
if (OnlineUserManager.checkUidOnline(session.getUid())){
ISession iSession = OnlineUserManager.getSessionByUid(session.getUid());
MessageUtil.sendErrorCode(session, ErrorCode.reloginCode);
iSession.close();
}
// if (myToken != packetNetData.getToken()){
// return 1;
// }