ONOS-6785

ServiceNotFoundException in ONOS shutdown

Change-Id: I793a6fc34a8b7e9a3b7ff0010c9adfaa3e7527c5
This commit is contained in:
dvaddire 2017-07-04 11:42:53 +05:30 committed by Simon Hunt
parent 2e97be0449
commit b09fdf3415

View File

@ -214,9 +214,12 @@ public class UiWebSocket
@Override @Override
public synchronized void onClose(int closeCode, String message) { public synchronized void onClose(int closeCode, String message) {
try {
tokenService().revokeToken(sessionToken); tokenService().revokeToken(sessionToken);
log.info("Session token revoked"); log.info("Session token revoked");
} catch (ServiceNotFoundException e) {
log.error("Unable to reference UiTokenService");
}
sessionToken = null; sessionToken = null;
topoSession.destroy(); topoSession.destroy();
@ -410,11 +413,7 @@ public class UiWebSocket
} }
private UiTokenService tokenService() { private UiTokenService tokenService() {
UiTokenService service = directory.get(UiTokenService.class); return directory.get(UiTokenService.class);
if (service == null) {
log.error("Unable to reference UiTokenService");
}
return service;
} }
// sends the collated localization bundle data up to the client. // sends the collated localization bundle data up to the client.