closeconnection.c

来自「适合于Unix/Linux下的一个持久数据库连接池」· C语言 代码 · 共 64 行

C
64
字号
// Copyright (c) 1999-2001  David Muse// See the file COPYING for more information#include <sqlrconnection.h>void sqlrconnection_svr::closeConnection() {	// decrement the connection counter	if (decrementonclose && cfgfl->getDynamicScaling() &&						semset && idmemory) {		decrementConnectionCount();	}	// deregister and close the handoff socket if necessary	if (cfgfl->getPassDescriptor()) {		deRegisterForHandoff(tmpdir->getString());	}	// close the cursors	closeCursors(true);	// try to log out	#ifdef SERVER_DEBUG	debugPrint("connection",0,"logging out...");	#endif	logOutUpdateStats();	#ifdef SERVER_DEBUG	debugPrint("connection",0,"done logging out");	#endif	// clear the pool	#ifdef SERVER_DEBUG	debugPrint("connection",0,"removing all sockets...");	#endif	removeAllFileDescriptors();	#ifdef SERVER_DEBUG	debugPrint("connection",0,"done removing all sockets");	#endif	// close, clean up all sockets	#ifdef SERVER_DEBUG	debugPrint("connection",0,"deleting unix socket...");	#endif	delete serversockun;	#ifdef SERVER_DEBUG	debugPrint("connection",0,"done deleting unix socket");	#endif	#ifdef SERVER_DEBUG	debugPrint("connection",0,"deleting inetsockets...");	#endif	for (uint64_t index=0; index<serversockincount; index++) {		delete serversockin[index];	}	delete[] serversockin;	#ifdef SERVER_DEBUG	debugPrint("connection",0,"done deleting inet socket");	#endif}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?