1. vadimtsushko
  2. mongo-dart

Source

mongo-dart / lib / networking / connection.dart

Diff from to

File lib/networking/connection.dart

  • Ignore whitespace
   Binary bufferToSend;
   Queue<MongoMessage> sendQueue;
   Binary messageBuffer;
-  Socket socket;  
+  Socket socket;
+  bool connected = false;
   Connection([this.serverConfig]){
     if (serverConfig === null){
       serverConfig = new ServerConfig();
         print("connect exception ${e}");
         completer.completeException(e);
       };
-      socket.onConnect = () {        
+      socket.onConnect = () {
+        connected = true;
         completer.complete(true);
       };
       return completer.future;