Handle join limit on server only when no pending command.
[silc.git] / apps / silcd / command.c
index aab262247d44b2f90e2387d8c82823f6e63d8aa0..82bc2f6ee035a5af7853e0b511cfaa9b37af9b7d 100644 (file)
@@ -2419,7 +2419,8 @@ SILC_SERVER_CMD_FUNC(join)
 
 #ifndef SILC_DIST_INPLACE
     /* Limit how many channels client can join */
-    if (entry->channels && silc_hash_table_count(entry->channels) >=
+    if (!cmd->pending && entry->channels &&
+       silc_hash_table_count(entry->channels) >=
        server->config->param.chlimit) {
       silc_server_command_send_status_reply(cmd, SILC_COMMAND_JOIN,
                                            SILC_STATUS_ERR_RESOURCE_LIMIT,