Close socket related to hostnode. */
| 387 | |
| 388 | /* Close socket related to hostnode. */ |
| 389 | static void shutdown_hostnode_socket(host_node_type *host_node_ptr) |
| 390 | { |
| 391 | if (gbl_libevent) { |
| 392 | return; |
| 393 | } |
| 394 | if (gbl_verbose_net) { |
| 395 | host_node_printf(LOGMSG_USER, host_node_ptr, "shutting down fd %d\n", |
| 396 | host_node_ptr->fd); |
| 397 | } |
| 398 | if (shutdown(host_node_ptr->fd, 2) != 0) { |
| 399 | if (errno != ENOTCONN) { |
| 400 | host_node_errf(LOGMSG_ERROR, host_node_ptr, |
| 401 | "%s: shutdown fd %d errno %d %s\n", __func__, |
| 402 | host_node_ptr->fd, errno, strerror(errno)); |
| 403 | } |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | /* This must be called while holding the host_node_ptr->lock. |
| 408 | * |
no test coverage detected