- // Yay, successful connect. Try to set it as nonblocking.
- int one = 1;
- if (ioctl(sock, FIONBIO, &one) == -1) {
- log_perror("ioctl(FIONBIO)");
- state = CLOSING_SOCKET;
- } else {
- state = SENDING_REQUEST;
- request = "GET " + path + " HTTP/1.0\r\nHost: " + host_header(host, port) + "\r\nUser-Agent: cubemap\r\n\r\n";
- request_bytes_sent = 0;
- }
+ // Yay, successful connect.
+ state = SENDING_REQUEST;
+ request = "GET " + path + " HTTP/1.0\r\nHost: " + host_header(host, port) + "\r\nUser-Agent: cubemap\r\n\r\n";
+ request_bytes_sent = 0;