File tree 3 files changed +12
-3
lines changed
3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,9 @@ export async function connect(
81
81
null ,
82
82
) ;
83
83
assertResult (
84
- Deno . UnsafePointer . value ( hFile ) !== C . INVALID_HANDLE_VALUE ,
84
+ ! ( C . INVALID_HANDLE_VALUE as readonly ( number | bigint ) [ ] ) . includes (
85
+ Deno . UnsafePointer . value ( hFile ) ,
86
+ ) ,
85
87
`CreateFile failed: ${ path } ` ,
86
88
) ;
87
89
return new NamedPipeClientConn ( path , hFile ) ;
Original file line number Diff line number Diff line change 1
- export const INVALID_HANDLE_VALUE = - 1n ;
1
+ export const INVALID_HANDLE_VALUE = [
2
+ 0xffff_ffff_ffff_ffffn ,
3
+ // NOTE: Prior to Deno 1.44, -1n was returned as the error handle.
4
+ // See: https://github.com/denoland/deno/pull/23981
5
+ - 1n ,
6
+ ] as const ;
2
7
3
8
export const ERROR_SUCCESS = 0 ;
4
9
export const ERROR_BROKEN_PIPE = 109 ;
Original file line number Diff line number Diff line change @@ -215,7 +215,9 @@ function createNamedPipe(params: Required<NamedPipeListenOptions>) {
215
215
null ,
216
216
) ;
217
217
assertResult (
218
- Deno . UnsafePointer . value ( handle ) !== C . INVALID_HANDLE_VALUE ,
218
+ ! ( C . INVALID_HANDLE_VALUE as readonly ( number | bigint ) [ ] ) . includes (
219
+ Deno . UnsafePointer . value ( handle ) ,
220
+ ) ,
219
221
`CreateNamedPipe failed: ${ path } ` ,
220
222
) ;
221
223
return handle ;
You can’t perform that action at this time.
0 commit comments