File tree 2 files changed +6
-13
lines changed
2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ enum SSHServerError: Error {
35
35
36
36
final class ExecHandler : ChannelDuplexHandler {
37
37
typealias InboundIn = SSHChannelData
38
- typealias InboundOut = ByteBuffer
38
+ typealias InboundOut = SSHChannelData
39
39
typealias OutboundIn = SSHChannelData
40
40
typealias OutboundOut = SSHChannelData
41
41
@@ -92,18 +92,7 @@ final class ExecHandler: ChannelDuplexHandler {
92
92
}
93
93
94
94
func channelRead( context: ChannelHandlerContext , data: NIOAny ) {
95
- let data = self . unwrapInboundIn ( data)
96
-
97
- guard case . byteBuffer( let bytes) = data. data else {
98
- fatalError ( " Unexpected read type " )
99
- }
100
-
101
- guard case . channel = data. type else {
102
- context. fireErrorCaught ( SSHServerError . invalidDataType)
103
- return
104
- }
105
-
106
- context. fireChannelRead ( self . wrapInboundOut ( bytes) )
95
+ context. fireChannelRead ( data)
107
96
}
108
97
109
98
func write( context: ChannelHandlerContext , data: NIOAny , promise: EventLoopPromise < Void > ? ) {
Original file line number Diff line number Diff line change @@ -84,6 +84,10 @@ final class SubsystemHandler: ChannelDuplexHandler {
84
84
func write( context: ChannelHandlerContext , data: NIOAny , promise: EventLoopPromise < Void > ? ) {
85
85
context. write ( data, promise: promise)
86
86
}
87
+
88
+ deinit {
89
+ configured. fail ( CitadelError . channelCreationFailed)
90
+ }
87
91
}
88
92
89
93
final class CitadelServerDelegate {
You can’t perform that action at this time.
0 commit comments