Correctly close opened streams
Second try to implement Netty version 3.9.0