make decode business logic synchronized
This commit is contained in:
Binary file not shown.
@@ -12,6 +12,7 @@ import net.irext.decode.service.utils.MD5Util;
|
|||||||
import net.irext.decode.sdk.IRDecode;
|
import net.irext.decode.sdk.IRDecode;
|
||||||
import net.irext.decode.sdk.bean.ACStatus;
|
import net.irext.decode.sdk.bean.ACStatus;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
|
|
||||||
import javax.servlet.ServletContext;
|
import javax.servlet.ServletContext;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -103,6 +104,7 @@ public class DecodeLogic {
|
|||||||
public int[] decode(RemoteIndex remoteIndex, ACStatus acStatus,
|
public int[] decode(RemoteIndex remoteIndex, ACStatus acStatus,
|
||||||
int keyCode, int changeWindDirection) {
|
int keyCode, int changeWindDirection) {
|
||||||
int[] decoded = null;
|
int[] decoded = null;
|
||||||
|
synchronized(this) {
|
||||||
if (null != remoteIndex) {
|
if (null != remoteIndex) {
|
||||||
int categoryId = remoteIndex.getCategoryId();
|
int categoryId = remoteIndex.getCategoryId();
|
||||||
int subCate = remoteIndex.getSubCate();
|
int subCate = remoteIndex.getSubCate();
|
||||||
@@ -115,6 +117,7 @@ public class DecodeLogic {
|
|||||||
irDecode.closeBinary();
|
irDecode.closeBinary();
|
||||||
return decoded;
|
return decoded;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user