File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -26,19 +26,20 @@ public PipeServer(Action<PipeSocket> callback)
2626 {
2727 this . callback = callback ;
2828 this . _handle = Marshal . AllocHGlobal ( Sizes . PipeT ) ;
29- uv_pipe_init ( this . _handle ) ;
29+ Util . CheckError ( uv_pipe_init ( this . _handle ) ) ;
3030 var handle = ( uv_handle_t ) Marshal . PtrToStructure ( this . _handle , typeof ( uv_handle_t ) ) ;
3131 this . me = GCHandle . Alloc ( this ) ;
3232 handle . data = GCHandle . ToIntPtr ( this . me ) ;
3333 Marshal . StructureToPtr ( handle , this . _handle , true ) ;
3434 }
3535 public void Listen ( string endpoint )
3636 {
37- uv_pipe_bind ( this . _handle , endpoint ) ;
38- uv_listen ( this . _handle , 128 , unmanaged_callback ) ;
37+ Util . CheckError ( uv_pipe_bind ( this . _handle , endpoint ) ) ;
38+ Util . CheckError ( uv_listen ( this . _handle , 128 , unmanaged_callback ) ) ;
3939 }
4040 public static void StaticCallback ( IntPtr server_ptr , int status )
4141 {
42+ Util . CheckError ( status ) ;
4243 var handle = ( uv_handle_t ) Marshal . PtrToStructure ( server_ptr , typeof ( uv_handle_t ) ) ;
4344 var instance = GCHandle . FromIntPtr ( handle . data ) ;
4445 var server = ( PipeServer ) instance . Target ;
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ public void Listen(IPEndPoint endpoint)
4242 }
4343 public static void StaticCallback ( IntPtr server_ptr , int status )
4444 {
45+ Util . CheckError ( status ) ;
4546 var handle = ( uv_handle_t ) Marshal . PtrToStructure ( server_ptr , typeof ( uv_handle_t ) ) ;
4647 var instance = GCHandle . FromIntPtr ( handle . data ) ;
4748 var server = ( TcpServer ) instance . Target ;
You can’t perform that action at this time.
0 commit comments