Browse Source

fixed bug of server_clear_function called at client side

wangyu- 7 years ago
parent
commit
000fa673ed
1 changed files with 8 additions and 1 deletions
  1. 8 1
      connection.h

+ 8 - 1
connection.h

@@ -306,7 +306,14 @@ struct conn_info_t     //stores info for a raw connection.for client ,there is o
 
 	conn_info_t()
 	{
-		conv_manager.s.additional_clear_function=server_clear_function;
+		if(program_mode==server_mode)
+		{
+			conv_manager.s.additional_clear_function=server_clear_function;
+		}
+		else
+		{
+			assert(program_mode==client_mode);
+		}
 	}
 
 	~conn_info_t()