use of com.cloudhopper.smpp.type.UnrecoverablePduException in project load-balancer by RestComm.
the class MServerConnectionImpl method sendUnbindResponse.
@Override
public void sendUnbindResponse(Pdu packet) {
enquireRunnable.cancel();
enquireTimer.cancel(false);
if (packetMap.containsKey(packet.getSequenceNumber())) {
TimerData data = packetMap.remove(packet.getSequenceNumber());
if (data != null) {
data.getRunnable().cancel();
data.getScheduledFuture().cancel(false);
}
}
ChannelBuffer buffer = null;
try {
buffer = transcoder.encode(packet);
} catch (UnrecoverablePduException e) {
logger.error("Encode error: ", e);
} catch (RecoverablePduException e) {
logger.error("Encode error: ", e);
}
serverState = ServerState.CLOSED;
packetMap.clear();
sequenceMap.clear();
if (logger.isDebugEnabled())
logger.debug("LB sent unbind response (" + packet + ") to server " + channel.getRemoteAddress().toString() + ". session ID : " + sessionId);
channel.write(buffer);
}
Aggregations