Update WriteHandlerManager.java

fix the "java.nio.channels.ClosedChannelException" exception