socket连接
This commit is contained in:
parent
dc4a221b20
commit
5507e49ff7
@ -77,7 +77,8 @@ public class RemoteControllerProcessor {
|
|||||||
remoteControllerSocketDTO.setControllerPort(cockpitPort);
|
remoteControllerSocketDTO.setControllerPort(cockpitPort);
|
||||||
Socket socket = new Socket();
|
Socket socket = new Socket();
|
||||||
try {
|
try {
|
||||||
socket.connect(new InetSocketAddress(cockpitIp, cockpitPort), 1000);
|
socket.setKeepAlive(true);
|
||||||
|
socket.connect(new InetSocketAddress(cockpitIp, cockpitPort), 500);
|
||||||
remoteControllerSocketDTO.setSocket(socket);
|
remoteControllerSocketDTO.setSocket(socket);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("添加socket失败 :{}", e);
|
log.error("添加socket失败 :{}", e);
|
||||||
@ -153,6 +154,8 @@ public class RemoteControllerProcessor {
|
|||||||
if (socket == null || socket.isClosed()) {
|
if (socket == null || socket.isClosed()) {
|
||||||
try {
|
try {
|
||||||
socket = new Socket();
|
socket = new Socket();
|
||||||
|
log.info("连接新的的socket");
|
||||||
|
socket.setKeepAlive(true);
|
||||||
socket.connect(new InetSocketAddress(cockpitIp, cockpit.getControllerPort()), 1000);
|
socket.connect(new InetSocketAddress(cockpitIp, cockpit.getControllerPort()), 1000);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("连接socket出现异常 :{}", cockpitIp);
|
log.error("连接socket出现异常 :{}", cockpitIp);
|
||||||
|
@ -526,12 +526,12 @@ public class RobotTaskServiceImpl extends ServiceImpl<RobotTaskMapper, RobotTask
|
|||||||
throw exception(TASK_CHECK_HAVE_DOING_TASK);
|
throw exception(TASK_CHECK_HAVE_DOING_TASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> commandTypes = PathTaskTypeEnum.getMistakeTaskTypes();
|
/*List<String> commandTypes = PathTaskTypeEnum.getMistakeTaskTypes();
|
||||||
List<RobotTaskDetailActionLogDO> actionLogDOList = taskDetailActionLogMapper.getMistakeTaskByCommandType(commandTypes);
|
List<RobotTaskDetailActionLogDO> actionLogDOList = taskDetailActionLogMapper.getMistakeTaskByCommandType(commandTypes);
|
||||||
if (ObjectUtil.isNotEmpty(actionLogDOList)) {
|
if (ObjectUtil.isNotEmpty(actionLogDOList)) {
|
||||||
log.info("编辑地图存在未完成的移动到等待点/自动充电任务");
|
log.info("编辑地图存在未完成的移动到等待点/自动充电任务");
|
||||||
throw exception(TASK_CHECK_HAVE_DOING_TASK);
|
throw exception(TASK_CHECK_HAVE_DOING_TASK);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user