         connection.write(bytes: sendA) {
             sent in
             guard sent == sendA.count else {
-                return callback(false)
+                self.completedCallback = nil
+                self.connection.close()
+                return
             }
             self.bodyBytes.append(httpCR)
             self.bodyBytes.append(httpLF)

            sent in
            self.bodyBytes.removeAll()
            guard bodyCount == sent else {
                return callback(false)
            }
            Threading.dispatch {
                callback(true)

        }
        responseString.append("\r\n")
        connection.write(string: responseString) {
            sent in
            guard sent > 0 else {
                self.completedCallback = nil
                self.connection.close()
                return
            }
            self.push(callback: callback)
        }
    }
