Skip to content
Snippets Groups Projects
Commit dd3cb5fa authored by Srinivasan Ramasubramanian's avatar Srinivasan Ramasubramanian
Browse files

Close the channel in the finalize() function of OFSwitchImpl.

parent 3f37cad6
No related branches found
No related tags found
No related merge requests found
...@@ -898,7 +898,7 @@ public class Controller ...@@ -898,7 +898,7 @@ public class Controller
} }
// will eventually trigger a removeSwitch(), which will cause // will eventually trigger a removeSwitch(), which will cause
// a "Not removing Switch ... already removed debug message. // a "Not removing Switch ... already removed debug message.
oldSw.getChannel().close(); // oldSw.getChannel().close();
} }
updateActiveSwitchInfo(sw); updateActiveSwitchInfo(sw);
......
...@@ -360,4 +360,9 @@ public class OFSwitchImpl implements IOFSwitch { ...@@ -360,4 +360,9 @@ public class OFSwitchImpl implements IOFSwitch {
public TimedCache<Long> getTimedCache() { public TimedCache<Long> getTimedCache() {
return timedCache; return timedCache;
} }
protected void finalize() {
if (this.channel != null)
this.channel.close();
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment