el NPE
This commit is contained in:
parent
1d07519ccb
commit
a59d48615b
@ -179,7 +179,7 @@ public class ChargingPileBinaryHandler implements ClientBinaryHandler {
|
||||
ChargingStationDto cacheStation = REDIS.getCacheObject("station:".concat(cachePile.get("stationId").toString()));
|
||||
cachePile.put("rateModelId", cacheStation.getRateModelId());
|
||||
REDIS.setCacheMap(pilekey, cachePile);
|
||||
log.debug("rate model responds success√");
|
||||
log.debug("[{}] rate model[{}] responds success√", pilekey, cacheStation.getRateModelId());
|
||||
}
|
||||
|
||||
private List<byte[]> parseDataList(byte[] data) {
|
||||
|
||||
@ -112,17 +112,19 @@ public class ChargingPileServer {
|
||||
public static void removeHandler(String pileNo) {
|
||||
|
||||
ClientHandler handler = handlerMap.remove(pileNo);
|
||||
// handler.closeConnection();
|
||||
// log.debug("handler [{}] for ({}) close connection", handler.getName(), pileNo);
|
||||
String pkey = "pile:".concat(pileNo);
|
||||
Map<String, Object> cachePile = REDIS.getCacheMap(pkey);
|
||||
cachePile.put("status", DISCONNECTED);
|
||||
REDIS.setCacheMap(pkey, cachePile);
|
||||
putemDisconn(pileNo, cachePile);
|
||||
log.debug("remove handler [{}] for ({}), now try to close conn..", handler.getName(), pileNo);
|
||||
handler.closeConnection();
|
||||
pileMap.remove(handler.getName());
|
||||
versionMapper.remove(handler.getName());
|
||||
if (handler != null) {
|
||||
// handler.closeConnection();
|
||||
// log.debug("handler [{}] for ({}) close connection", handler.getName(), pileNo);
|
||||
log.debug("remove handler [{}] for ({}), now try to close conn..", handler.getName(), pileNo);
|
||||
handler.closeConnection();
|
||||
pileMap.remove(handler.getName());
|
||||
versionMapper.remove(handler.getName());
|
||||
}
|
||||
}
|
||||
|
||||
public static void sendClientMsg(String pileNo, byte[] msg) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user