Index: pan/tasks/nntp-pool.cc
===================================================================
RCS file: /cvs/gnome/pan2/pan/tasks/nntp-pool.cc,v
retrieving revision 1.2
diff -u -r1.2 nntp-pool.cc
--- pan/tasks/nntp-pool.cc	10 Oct 2006 22:19:42 -0000	1.2
+++ pan/tasks/nntp-pool.cc	31 Oct 2006 04:26:41 -0000
@@ -32,7 +32,7 @@
   _server_info (server_info),
   _server (server),
   _socket_creator (creator),
-  _connection_pending (false),
+  _pending_connections (0),
   _max_connections (_server_info.get_server_limits (_server)),
   _active_count (0)
 {
@@ -126,7 +126,7 @@
   if (!ok)
   {
     delete socket;
-    _connection_pending = false;
+    --_pending_connections;
   }
   else
   {
@@ -165,7 +165,7 @@
       nntp = 0;
    }
 
-   _connection_pending = false;
+   --_pending_connections;
 
    // if success...
    if (nntp != 0)
@@ -191,7 +191,7 @@
   setme_active = _active_count;
   setme_idle = _pool_items.size() - _active_count;
   setme_max = _max_connections;
-  setme_pending  = _connection_pending ? 1 : 0;
+  setme_pending  = _pending_connections;
 }
 
 
@@ -209,11 +209,11 @@
             << "max: " << max << ' ' << std::endl;
 #endif
 
-  if (!idle && !pending && active<max)
+  if (!idle && ((pending+active)<max))
   {
     debug ("trying to create a socket");
 
-    _connection_pending = true;
+    ++_pending_connections;
     std::string address;
     int port;
     _server_info.get_server_addr (_server, address, port);
Index: pan/tasks/nntp-pool.h
===================================================================
RCS file: /cvs/gnome/pan2/pan/tasks/nntp-pool.h,v
retrieving revision 1.2
diff -u -r1.2 nntp-pool.h
--- pan/tasks/nntp-pool.h	10 Oct 2006 22:19:42 -0000	1.2
+++ pan/tasks/nntp-pool.h	31 Oct 2006 04:26:41 -0000
@@ -95,7 +95,7 @@
       ServerInfo& _server_info;
       const Quark _server;
       Socket::Creator * _socket_creator;
-      bool _connection_pending;
+      int _pending_connections;
       int _max_connections;
 
       struct PoolItem {
Index: pan/tasks/socket-impl-gio.cc
===================================================================
RCS file: /cvs/gnome/pan2/pan/tasks/socket-impl-gio.cc,v
retrieving revision 1.4
diff -u -r1.4 socket-impl-gio.cc
--- pan/tasks/socket-impl-gio.cc	19 Oct 2006 16:30:50 -0000	1.4
+++ pan/tasks/socket-impl-gio.cc	31 Oct 2006 04:26:41 -0000
@@ -606,7 +606,7 @@
 
   static GThreadPool * pool (0);
   if (!pool)
-    pool = g_thread_pool_new (create_socket_thread_func, 0, 1, true, 0);
+    pool = g_thread_pool_new (create_socket_thread_func, 0, 4, true, 0);
 
   // farm this out to a worker thread so that the main thread
   // doesn't block while we open the socket.
