fix server.cpp bug