diff src/channel.c @ 9044:5abf6f38cbbb v7.4.1807

commit https://github.com/vim/vim/commit/d75263c020a5044fa73bc8cd57ce73ca5e23b360 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 30 16:07:23 2016 +0200 patch 7.4.1807 Problem: Test_out_close_cb sometimes fails. Solution: Always write DETACH to out, not err.
author Christian Brabandt <cb@256bit.org>
date Sat, 30 Apr 2016 16:15:05 +0200
parents 72a597e9e36d
children 31bba6f25d84
line wrap: on
line diff
--- a/src/channel.c
+++ b/src/channel.c
@@ -2478,6 +2478,7 @@ channel_close(channel_T *channel, int in
 	   * first invoke the close callback.  Increment the refcount to avoid
 	   * the channel being freed halfway. */
 	  ++channel->ch_refcount;
+	  ch_log(channel, "Invoking callbacks before closing");
 	  for (part = PART_SOCK; part <= PART_ERR; ++part)
 	      while (may_invoke_callback(channel, part))
 		  ;
@@ -2783,7 +2784,7 @@ channel_close_on_error(channel_T *channe
      */
     if (channel->ch_part[part].ch_mode == MODE_RAW
 			     || channel->ch_part[part].ch_mode == MODE_NL)
-	channel_save(channel, part, (char_u *)DETACH_MSG_RAW,
+	channel_save(channel, PART_OUT, (char_u *)DETACH_MSG_RAW,
 			      (int)STRLEN(DETACH_MSG_RAW), FALSE, "PUT ");
 
     /* When reading from stdout is not possible, assume the other side has