Skip to content

Commit 9a64b25

Browse files
authored
Remove half closure from client connection (#188)
The client shouldnt need half closure as the database closing the connection means the client connection should close as well. This was also leaving connections open. Signed-off-by: Adam Fowler <adamfowler71@gmail.com>
1 parent 134a826 commit 9a64b25

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Sources/Valkey/Connection/ValkeyConnection.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,15 +361,13 @@ public final actor ValkeyConnection: ValkeyClientProtocol, Sendable {
361361
/// create a BSD sockets based bootstrap
362362
private static func createSocketsBootstrap(eventLoopGroup: EventLoopGroup) -> ClientBootstrap {
363363
ClientBootstrap(group: eventLoopGroup)
364-
.channelOption(ChannelOptions.allowRemoteHalfClosure, value: true)
365364
}
366365

367366
#if canImport(Network)
368367
/// create a NIOTransportServices bootstrap using Network.framework
369368
private static func createTSBootstrap(eventLoopGroup: EventLoopGroup, tlsOptions: NWProtocolTLS.Options?) -> NIOTSConnectionBootstrap? {
370369
guard
371-
let bootstrap = NIOTSConnectionBootstrap(validatingGroup: eventLoopGroup)?
372-
.channelOption(ChannelOptions.allowRemoteHalfClosure, value: true)
370+
let bootstrap = NIOTSConnectionBootstrap(validatingGroup: eventLoopGroup)
373371
else {
374372
return nil
375373
}

0 commit comments

Comments
 (0)