         var completed = false
 
         asyncMessagesSent = 0
+        asyncBytesSent = 0
         asyncMessagesReceived = 0
-        asyncBytesSent = 0
         asyncBytesReceived = 0
 
         do {

import Foundation
import C7
import Mutex

@testable import NanoMessage

class MessageSpeedTests: XCTestCase {
    var asyncErrorMutex: Mutex = try! Mutex()
    var asyncMessagesSent: UInt64 = 0
    var asyncMessagesReceived: UInt64 = 0
    var asyncBytesSent: UInt64 = 0
    var asyncBytesReceived: UInt64 = 0

    enum ReceiveType {

                    case .Asynchronously:
                        node0.sendMessage(messagePayload,
                                          success: { bytesSent in
                                              doCatchWrapper(funcCall: {
                                                                 try self.asyncSendMutex.lock {
                                                                     self.asyncMessagesSent += 1
                                                                     self.asyncBytesSent += UInt64(bytesSent)
                                                                 }
                                                             },
                                                             failed:   { failure in
                                                                 nanoMessageLogger(failure)
                                                             })
                                          })
                        node1.receiveMessage(success: { received in
                                                 doCatchWrapper(funcCall: {
                                                                    try self.asyncReceiveMutex.lock {
                                                                        self.asyncMessagesReceived += 1
                                                                        self.asyncBytesReceived += UInt64(received.bytes)
                                                                    }
                                                                },
                                                                failed:   { failure in
                                                                    nanoMessageLogger(failure)
                                                                })
                                             })
                }
            }
