         
         free(dataSentToPrinter)
         
-        closeConnection()
+        var token: dispatch_once_t = 0
+        if queue.operationCount == 1 {
+            printing = false
+            closeConnection()
+            token = 0
+        } else {
+            dispatch_once(&token) {
+                dispatch_after(30, dispatch_get_main_queue()) {
+                    if self.printing {
+                        self.closeConnection()
+                        token = 0
+                    }
+                }
+            }
+        }
     }
 
     private func establishConnection() throws {
+        guard status == .Disconnected else {
+            return
+        }
+        
         status = .Connecting
         var connected = false
         for _ in 0..<3 {
             connected = openPort()
             if connected {
                 status = .Connected
-                break
+                return
             }
             sleep(3)
         }
-        if !connected {
-            status = .Disconnected
-            throw PrintingError.EstablishingConnection
-        }
+        
+        status = .Disconnected
+        throw PrintingError.EstablishingConnection
     }
     
     private func closeConnection() {

            delegate?.printer(self, didChangeStatus: status)
        }
    }
    
    public var portName: String {
        return portInfo.portName

    init(portInfo: PortInfo) {
        self.portInfo = portInfo
        self.status = .Disconnected
        self.printing = false
        self.queue.maxConcurrentOperationCount = 1
    }
    
