                         self.currentReadRequest = nil
                         if endReached
                         {
-                            self.currentMessage = nil
+                            self.currentReadMessage = nil
                         }
                         theReadRequest.callback?(length: theReadRequest.satisfied, endReached: endReached, error: error)
                     }
                 } else {
                     self.currentReadRequest = nil
-                    self.currentMessage = nil
+                    self.currentReadMessage = nil
                     theReadRequest.callback?(length: 0, endReached: false, error: error)
                 }
             }

                // close the connection
                self.readerClosed()
            } else {
                self.onControlFrame?(frame: self.currentFrame) {(error) in
                    if (self.currentFrame.opcode == WSFrame.Opcode.CloseFrame)
                    {
                        self.readerClosed()

     //    private var readQueue = WSReadRequest()
    private var currentReadRequest : WSReadRequest?
    
    /**
     * This method must always be called
     */
    public func startReading()
    {
        self.continueReading()
    }
