--- a/connection.c
+++ b/connection.c
@@ -67,7 +67,10 @@
return EXIT_FAILURE;
}
- write (sockfd, "GET /\r\n", 7);
+ if (write (sockfd, "GET /\r\n", 7) == -1) {
+ perror ("write");
+ return EXIT_FAILURE;
+ }
while ((num = read (sockfd, buffer, 1023)) != 0) {
buffer[num] = 0;