diff --git a/src/sbbs3/ftpsrvr.c b/src/sbbs3/ftpsrvr.c
index 33e9ee71ce24438f90f89e962b9e5eb2f21c10ff..f2b7f2760ff7b29d8813c8b8a194522ee79e33d3 100644
--- a/src/sbbs3/ftpsrvr.c
+++ b/src/sbbs3/ftpsrvr.c
@@ -4232,7 +4232,8 @@ static void ctrl_thread(void* arg)
 	tmp_sock=sock;
 	ftp_close_socket(&tmp_sock,__LINE__);
 
-	active_clients--;
+	if(active_clients>0)
+		active_clients--;
 	update_clients();
 
 	thread_down();