diff --git a/lib/modules/Protocols.pmod/Ident.pmod b/lib/modules/Protocols.pmod/Ident.pmod
index 6ffedc92372be00a5a80262b2cbd8b515d3dbacf..b11b4a28e247e27584b5a46fb0f0ffb06cfda513 100644
--- a/lib/modules/Protocols.pmod/Ident.pmod
+++ b/lib/modules/Protocols.pmod/Ident.pmod
@@ -1,6 +1,6 @@
 // An implementation of the IDENT protocol, specified in RFC 931.
 //
-// $Id: Ident.pmod,v 1.6 1998/05/28 19:50:03 grubba Exp $
+// $Id: Ident.pmod,v 1.7 1999/01/30 01:35:41 grubba Exp $
 
 
 // #define IDENT_DEBUG
@@ -100,6 +100,14 @@ class lookup_async
     do_callback(({ "ERROR", "TIMEOUT" }));
   }
 
+  void connected()
+  {
+#ifdef IDENT_DEBUG
+    werror(sprintf("Protocols.Ident: Connection OK, query:%O\n", query));
+#endif /* IDENT_DEBUG */
+    con->set_nonblocking(read_cb, write_cb, close_cb);
+  }
+
   void create(object fd, function(array(string), mixed ...:void) cb,
 	      mixed ... args)
   {
@@ -121,21 +129,19 @@ class lookup_async
       destruct(con);
       error("Protocols.Ident: open_socket() failed.");
     }
-    mixed err;
-    if (err = catch(con->connect(raddr[0], 113))) {
-      destruct(con);
-      throw(err);
-    }
-
-#ifdef IDENT_DEBUG
-    werror(sprintf("Protocols.Ident: Connection OK, query:%O\n", query));
-#endif /* IDENT_DEBUG */
 
     callback = cb;
     cb_args = args;
-    con->set_nonblocking(read_cb, write_cb, close_cb);
 
     call_out(timeout, 60);
+
+    mixed err;
+    if (err = catch(con->async_connect(raddr[0], 113, connected, close_cb))) {
+      callback = 0;
+      cb_args = 0;
+      destruct(con);
+      throw(err);
+    }
   }
 }