Hi,

I found some problems with the channel feature. (v7.4.1246)

1. On Win32 GUI, vim hangs up.

:let handle = ch_open('localhost:8765', 'json')
:echo ch_sendexpr(handle, 'hello!')
Vim hangs up.

Or,

:let handle = ch_open('localhost:8765', 'json')
:quit
Vim hangs up.

The following patch seems to fix this:

--- a/src/vim.h
+++ b/src/vim.h
@@ -549,7 +549,7 @@ typedef unsigned long u8char_T;         /* l
 # ifdef HAVE_SYS_POLL_H
 #  include <sys/poll.h>
 #  define HAVE_POLL
-# elif defined(WIN32) && !defined(FEAT_GUI_W32)
+# elif defined(WIN32)
 #  define HAVE_SELECT
 # else
 #  ifdef HAVE_POLL_H

I'm not sure this is enough.
Maybe returning an error code in channel_read() is better?


2. On Win32 GUI, socket is closed unexpectedly.

After the above patch is applied:

:let handle = ch_open('localhost:8765', 'json')
:echo ch_sendexpr(handle, 'hello!')
The socket is automatically closed.

But this doesn't close the socket:
:call ch_sendexpr(handle, 'hello!', "MyHandler")

This doesn't occur on Win32 CUI.


3. Crashes when opening the same socket twice.

:let handle = ch_open('localhost:8765', 'json')
:let handle = ch_open('localhost:8765', 'json')
Vim crashes.

This also occurs on Linux.


Regards,
Ken Takata

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui