call onDisconnet in onWriteable when needed