     internal var fullBuffer = [Byte]()
     
     /// A cache for incoming responses
+    private var incomingMutateLock = NSLock()
     private var incomingResponses = [(id: Int32, message: Message, date: NSDate)]()
     
     /// Contains a map from an ID to a handler. The handlers handle the `incomingResponses`

                let responseId = try Int32.instantiate(bsonData: fullBuffer[8...11]*)
                let reply = try Message.makeReply(from: responseData)
                
                incomingResponses.append((responseId, reply, NSDate()))
                
                fullBuffer.removeSubrange(0..<length)
            }

        #endif
        
        condition.unlock()
        
        incomingMutateLock.lock()
        defer {
            incomingMutateLock.unlock()
        }
        
        let i = incomingResponses.index(where: { $0.id == requestId })
        
