Commit 0142261 1 parent ec36df3 commit 0142261 Copy full SHA for 0142261
File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import {
15
15
} from "./types.ts" ;
16
16
17
17
const packr = new Packr ( { useRecords : false } ) ;
18
- const unpackrStream = new UnpackrStream ( { useRecords : false } ) ;
19
18
20
19
[ 0 , 1 , 2 ] . forEach ( ( type ) => {
21
20
// https://neovim.io/doc/user/api.html#api-definitions
@@ -42,6 +41,7 @@ export async function attach<ApiInfo extends BaseEvents = BaseEvents>({
42
41
let lastReqId = 0 ;
43
42
let handlerId = 0 ;
44
43
44
+ const unpackrStream = new UnpackrStream ( { useRecords : false } ) ;
45
45
const nvimSocket = await new Promise < net . Socket > ( ( resolve , reject ) => {
46
46
const client = new net . Socket ( ) ;
47
47
client . once ( "error" , reject ) ;
@@ -199,6 +199,7 @@ export async function attach<ApiInfo extends BaseEvents = BaseEvents>({
199
199
} ,
200
200
detach ( ) {
201
201
nvimSocket . destroy ( ) ;
202
+ unpackrStream . end ( ) ;
202
203
} ,
203
204
} ;
204
205
}
You can’t perform that action at this time.
0 commit comments