@@ -710,12 +710,10 @@ public struct PostgresCopyFromWriter: Sendable {
710710    } 
711711
712712    private  let  channelHandler :  NIOLoopBound < PostgresChannelHandler > 
713-     private  let  context :  NIOLoopBound < ChannelHandlerContext > 
714713    private  let  eventLoop :  any  EventLoop 
715714
716-     init ( handler:  PostgresChannelHandler ,  context :   ChannelHandlerContext ,   eventLoop:  any  EventLoop )  { 
715+     init ( handler:  PostgresChannelHandler ,  eventLoop:  any  EventLoop )  { 
717716        self . channelHandler =  NIOLoopBound ( handler,  eventLoop:  eventLoop) 
718-         self . context =  NIOLoopBound ( context,  eventLoop:  eventLoop) 
719717        self . eventLoop =  eventLoop
720718    } 
721719
@@ -728,20 +726,20 @@ public struct PostgresCopyFromWriter: Sendable {
728726        // error during the data transfer and thus cannot process any more data.
729727        try await  withCheckedThrowingContinuation  {  ( continuation:  CheckedContinuation < Void ,  any  Error > )  in  
730728            if  eventLoop. inEventLoop { 
731-                 self . channelHandler. value. waitForWritableBuffer ( context :   self . context . value ,   continuation) 
729+                 self . channelHandler. value. waitForWritableBuffer ( continuation) 
732730            }  else  { 
733731                eventLoop. execute  { 
734-                     self . channelHandler. value. waitForWritableBuffer ( context :   self . context . value ,   continuation) 
732+                     self . channelHandler. value. waitForWritableBuffer ( continuation) 
735733                } 
736734            } 
737735        } 
738736
739737        // Run the actual data transfer
740738        if  eventLoop. inEventLoop { 
741-             self . channelHandler. value. copyData ( byteBuffer,  context :   self . context . value ) 
739+             self . channelHandler. value. copyData ( byteBuffer) 
742740        }  else  { 
743741            eventLoop. execute  { 
744-                 self . channelHandler. value. copyData ( byteBuffer,  context :   self . context . value ) 
742+                 self . channelHandler. value. copyData ( byteBuffer) 
745743            } 
746744        } 
747745    } 
@@ -751,10 +749,10 @@ public struct PostgresCopyFromWriter: Sendable {
751749    func  done( )  async  throws  { 
752750        try await  withCheckedThrowingContinuation  {  ( continuation:  CheckedContinuation < Void ,  any  Error > )  in  
753751            if  eventLoop. inEventLoop { 
754-                 self . channelHandler. value. sendCopyDone ( continuation:  continuation,  context :   self . context . value ) 
752+                 self . channelHandler. value. sendCopyDone ( continuation:  continuation) 
755753            }  else  { 
756754                eventLoop. execute  { 
757-                     self . channelHandler. value. sendCopyDone ( continuation:  continuation,  context :   self . context . value ) 
755+                     self . channelHandler. value. sendCopyDone ( continuation:  continuation) 
758756                } 
759757            } 
760758        } 
@@ -765,10 +763,10 @@ public struct PostgresCopyFromWriter: Sendable {
765763    func  failed( error:  any  Error )  async  throws  { 
766764        try await  withCheckedThrowingContinuation  {  ( continuation:  CheckedContinuation < Void ,  any  Error > )  in  
767765            if  eventLoop. inEventLoop { 
768-                 self . channelHandler. value. sendCopyFailed ( message:  " \( error) " ,  continuation:  continuation,  context :   self . context . value ) 
766+                 self . channelHandler. value. sendCopyFailed ( message:  " \( error) " ,  continuation:  continuation) 
769767            }  else  { 
770768                eventLoop. execute  { 
771-                     self . channelHandler. value. sendCopyFailed ( message:  " \( error) " ,  continuation:  continuation,  context :   self . context . value ) 
769+                     self . channelHandler. value. sendCopyFailed ( message:  " \( error) " ,  continuation:  continuation) 
772770                } 
773771            } 
774772        } 
@@ -777,10 +775,10 @@ public struct PostgresCopyFromWriter: Sendable {
777775    /// Send a `Sync` message to the backend.
778776    func  sync( )  { 
779777        if  eventLoop. inEventLoop { 
780-             self . channelHandler. value. sendSync ( context :   self . context . value ) 
778+             self . channelHandler. value. sendSync ( ) 
781779        }  else  { 
782780            eventLoop. execute  { 
783-                 self . channelHandler. value. sendSync ( context :   self . context . value ) 
781+                 self . channelHandler. value. sendSync ( ) 
784782            } 
785783        } 
786784    } 
0 commit comments