         nextConnection: for pooledConnection in pool {
             let connection = pooledConnection.connection
             
-            if connection.context.isClosed {
+            guard !connection.context.isClosed, let handshakeResult = connection.handshakeResult else {
                 self.remove(connectionId: ObjectIdentifier(connection))
                 continue nextConnection
             }
             
-            let unwritable = writable && handshakeResult?.readOnly ?? false
-            let unreadable = !self.slaveOk && !(handshakeResult?.ismaster ?? false)
+            let unwritable = writable && handshakeResult.readOnly ?? false
+            let unreadable = !self.slaveOk && !handshakeResult.ismaster
             
             if unwritable || unreadable {
                 continue nextConnection

    let settings: ConnectionSettings
    let sessionManager: SessionManager
    
    /// Set to the lowest version handshake received from MongoDB
    internal var handshakeResult: ConnectionHandshakeReply?
    
    /// The shared ObjectId generator for this cluster
    /// Using the shared generator is more efficient and correct than `ObjectId()`
    internal let sharedGenerator = ObjectIdGenerator()

    private func send(context: MongoDBCommandContext) -> EventLoopFuture<ServerReply> {
        let future = self.getConnection().thenIfError { _ in
            return self.getConnection(writable: true)
            }.then { connection -> EventLoopFuture<Void> in
                connection.context.queries.append(context)
                return connection.channel.writeAndFlush(context)
        }
        future.cascadeFailure(promise: context.promise)
        
