| 1826 | |
| 1827 | |
| 1828 | static 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 | |
| 1862 | static int cleanup_ports(const int, const int, void* /*arg*/) |
nothing calls this directly
no test coverage detected