mirror of
https://github.com/azukaar/Cosmos-Server.git
synced 2026-01-05 20:05:02 -06:00
[relase] v0.1.18-unstable2
- restore network clean up
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cosmos-server",
|
||||
"version": "0.1.18-unstable",
|
||||
"version": "0.1.18-unstable2",
|
||||
"description": "",
|
||||
"main": "test-server.js",
|
||||
"bugs": {
|
||||
|
||||
@@ -56,12 +56,7 @@ func onDockerCreated(containerID string) {
|
||||
BootstrapContainerFromTags(containerID)
|
||||
}
|
||||
|
||||
func onDockerDestroyed(containerID string) {
|
||||
utils.Debug("onDockerDestroyed: " + containerID)
|
||||
NetworkCleanUp()
|
||||
}
|
||||
|
||||
func onNetworkDisconnect(networkID string) {
|
||||
utils.Debug("onNetworkDisconnect: " + networkID)
|
||||
NetworkCleanUp()
|
||||
NetworkCleanUp(networkID)
|
||||
}
|
||||
@@ -221,8 +221,11 @@ func ConnectToNetworkSync(networkName string, containerID string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NetworkCleanUp() {
|
||||
return
|
||||
func NetworkCleanUp(networkId) {
|
||||
if(networkId == "bridge" || networkId == "host" || networkId == "none") {
|
||||
return
|
||||
}
|
||||
|
||||
DockerNetworkLock <- true
|
||||
defer func() { <-DockerNetworkLock }()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user