if session disconnected during sendBytes, session.messageOut may be set to nil before write in session.onDisconnect()