connection.c
changeset 131 b5ad49852adc
parent 111 2247473fd12d
child 153 b223089872b6
--- 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;