Skip to content

Commit 810423e

Browse files
committed
[BUGFIX] is_running() causes Broken Pipe exception
1 parent 4180633 commit 810423e

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

autoload/nvim_ghost/helper.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ function! nvim_ghost#helper#is_running() abort " {{{1
2323
" See s:send_GET_request for explanation on how this works
2424
let v:errmsg = ''
2525
let l:url = s:localhost .. ':' .. $GHOSTTEXT_SERVER_PORT
26-
silent! let l:connection = sockconnect('tcp', l:url)
26+
let l:opts = {
27+
\'on_data': {id,data,name->chanclose(id)},
28+
\'data_buffered': v:true,
29+
\}
30+
silent! let l:connection = sockconnect('tcp', l:url, l:opts)
2731
if v:errmsg !=# '' || l:connection == 0
2832
return v:false
2933
endif

binary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from simple_websocket_server import WebSocket
1919
from simple_websocket_server import WebSocketServer
2020

21-
BUILD_VERSION: str = "v0.2.3"
21+
BUILD_VERSION: str = "v0.2.4"
2222

2323
WINDOWS: bool = os.name == "nt"
2424
LOCALHOST: str = "127.0.0.1" if WINDOWS else "localhost"

binary_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.2.3
1+
v0.2.4

0 commit comments

Comments
 (0)