Memory management: when running under the testsuite, check every string variable...
[exim.git] / src / src / spam.c
index f46e11e42391d7005d412b42afa73a87f4db4bb5..ac25a881fb7679db1a425f8485bf5898bdaa0086 100644 (file)
@@ -414,12 +414,12 @@ if (wrote == -1)
   }
 
 /* now send the file */
-/* spamd sometimes accepts conections but doesn't read data off
+/* spamd sometimes accepts connections but doesn't read data off
  * the connection.  We make the file descriptor non-blocking so
  * that the write will only write sufficient data without blocking
- * and we poll the desciptor to make sure that we can write without
+ * and we poll the descriptor to make sure that we can write without
  * blocking.  Short writes are gracefully handled and if the whole
- * trasaction takes too long it is aborted.
+ * transaction takes too long it is aborted.
  * Note: poll() is not supported in OSX 10.2 and is reported to be
  *       broken in more recent versions (up to 10.4).
  */
@@ -494,7 +494,8 @@ if (ferror(mbox_file))
 (void)fclose(mbox_file);
 
 /* we're done sending, close socket for writing */
-shutdown(spamd_sock,SHUT_WR);
+if (!sd->is_rspamd)
+  shutdown(spamd_sock,SHUT_WR);
 
 /* read spamd response using what's left of the timeout.  */
 memset(spamd_buffer, 0, sizeof(spamd_buffer));