MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / force_close

Function force_close

src/remote/inet.cpp:1828–1859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1826
1827
1828static void force_close(rem_port* port)
1829{
1830/**************************************
1831 *
1832 * f o r c e _ c l o s e
1833 *
1834 **************************************
1835 *
1836 * Functional description
1837 * Forcebly close remote connection.
1838 *
1839 **************************************/
1840
1841 if (port->port_async)
1842 {
1843 rem_port* port_async = port->port_async;
1844 abort_aux_connection(port_async);
1845 port_async->force_close();
1846 }
1847
1848 if (port->port_state != rem_port::PENDING)
1849 return;
1850
1851 RefMutexGuard guard(*port->port_write_sync, FB_FUNCTION);
1852
1853 port->port_state = rem_port::BROKEN;
1854 if (port->port_handle != INVALID_SOCKET)
1855 {
1856 shutdown(port->port_handle, 2);
1857 SOCLOSE(port->port_handle);
1858 }
1859}
1860
1861
1862static int cleanup_ports(const int, const int, void* /*arg*/)

Callers

nothing calls this directly

Calls 4

abort_aux_connectionFunction · 0.85
shutdownFunction · 0.85
SOCLOSEFunction · 0.85
force_closeMethod · 0.80

Tested by

no test coverage detected