mirror of https://github.com/zlatinb/muwire
shutdown chat components
parent
8afd387ca6
commit
5e7f3587df
|
@ -110,6 +110,8 @@ public class Core {
|
||||||
final UploadManager uploadManager
|
final UploadManager uploadManager
|
||||||
final ContentManager contentManager
|
final ContentManager contentManager
|
||||||
final CertificateManager certificateManager
|
final CertificateManager certificateManager
|
||||||
|
final ChatServer chatServer
|
||||||
|
final ChatManager chatManager
|
||||||
|
|
||||||
private final Router router
|
private final Router router
|
||||||
|
|
||||||
|
@ -308,11 +310,11 @@ public class Core {
|
||||||
connectionEstablisher = new ConnectionEstablisher(eventBus, i2pConnector, props, connectionManager, hostCache)
|
connectionEstablisher = new ConnectionEstablisher(eventBus, i2pConnector, props, connectionManager, hostCache)
|
||||||
|
|
||||||
log.info("initializing chat server")
|
log.info("initializing chat server")
|
||||||
ChatServer chatServer = new ChatServer(eventBus, props, trustService, me)
|
chatServer = new ChatServer(eventBus, props, trustService, me)
|
||||||
eventBus.register(ChatMessageEvent.class, chatServer)
|
eventBus.register(ChatMessageEvent.class, chatServer)
|
||||||
|
|
||||||
log.info("initializing chat manager")
|
log.info("initializing chat manager")
|
||||||
ChatManager chatManager = new ChatManager(eventBus, me, i2pConnector, trustService, props)
|
chatManager = new ChatManager(eventBus, me, i2pConnector, trustService, props)
|
||||||
eventBus.with {
|
eventBus.with {
|
||||||
register(UIConnectChatEvent.class, chatManager)
|
register(UIConnectChatEvent.class, chatManager)
|
||||||
register(UIDisconnectChatEvent.class, chatManager)
|
register(UIDisconnectChatEvent.class, chatManager)
|
||||||
|
@ -385,6 +387,10 @@ public class Core {
|
||||||
directoryWatcher.stop()
|
directoryWatcher.stop()
|
||||||
log.info("shutting down cache client")
|
log.info("shutting down cache client")
|
||||||
cacheClient.stop()
|
cacheClient.stop()
|
||||||
|
log.info("shutting down chat server")
|
||||||
|
chatServer.shutdown()
|
||||||
|
log.info("shutting down chat manager")
|
||||||
|
chatManager.shutdown()
|
||||||
log.info("shutting down connection manager")
|
log.info("shutting down connection manager")
|
||||||
connectionManager.shutdown()
|
connectionManager.shutdown()
|
||||||
if (router != null) {
|
if (router != null) {
|
||||||
|
|
|
@ -170,4 +170,10 @@ class ChatServer {
|
||||||
connections[target.destination]?.sendChat(e)
|
connections[target.destination]?.sendChat(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void shutdown() {
|
||||||
|
connections.each { k, v ->
|
||||||
|
v.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue