private void onSessionClosed() {
		if (this.isSendingFile) {
			if (this.exceptionOccurred || this.closedByRemote) {
				this.finishSendingFile(false);
				this.fileSendingEventHandler.onSendingFailed(this.sendingFile);
			}
		} else if (this.isReceivingFile) {
			if (this.exceptionOccurred || this.closedByRemote) {
				this.finishReceivingFile(false);
				this.fileReceivingEventHandler.onReceivingFailed(this.receivingFile, GlobalUtil.OTHE_RREASON);
			}
		} else {
			if (this.fileSendingCancelled) {
				this.finishSendingFile(false);
				this.fileSendingEventHandler.onSendingCancelled(this.sendingFile);
			}
		}
		if (this.closedByRemote) {
			this.onSessionClosedByRemote();
		} else if (this.exceptionOccurred) {
			this.onSessionClosedByException();
		} else {
			this.onSessionClosedByLocal();
		}
	}