Commit 8795e913fc59ab88cff5189a5df767b72a22487b
set SO_REUSEADDR option - allows instant restart of FCGI-UNIX processes after crashes
| |   |
| 109 | 109 | sa.sin_family = AF_INET; |
| 110 | 110 | sa.sin_port = qToBigEndian(port); |
| 111 | 111 | |
| int one = 1; |
| if(setsockopt(d->m_socket, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) == -1) |
| { |
| qWarning("Failed to set SO_REUSEADDR option - error: %s", ::strerror(errno)); |
| } |
| 112 | 117 | // Try and bind to the port |
| 113 | 118 | if(::bind(d->m_socket, reinterpret_cast<sockaddr*>(&sa), sizeof(sa)) == -1) |
| 114 | 119 | { |