Fu Juntang
2021-09-01 8f30fea9909a6e519e802876ed8bc9c10c571863
src/net/net_mod_server_socket.cpp
@@ -64,7 +64,6 @@
    /* Wait for listening/connected descriptor(s) to become ready */
    pool.ready_set = pool.read_set;
    pool.nready = select(pool.maxfd + 1, &pool.ready_set, NULL, NULL, NULL);
 // LoggerFactory::getLogger()->debug("select return \n");
    /* If listening descriptor ready, add new client to pool */
    if (FD_ISSET(listenfd, &pool.ready_set))
    {
@@ -142,8 +141,6 @@
  request_head = NetModSocket::decode_request_head(request_head_bs);
  
// printf("server received request from host = %s:%d, key = %d, timeout=%d,\n",
//   request_head.host, request_head.port , request_head.key, request_head.timeout);
  if(request_head.content_length > max_buf) {
   
@@ -229,7 +226,7 @@
    if (rio_readn(connfd, topic_buf, request_head.topic_length) != request_head.topic_length ) {
      return -1;
    }
// LoggerFactory::getLogger()->debug("====server pub %s===\n", buf);
    memcpy(response_head.host, request_head.host, NI_MAXHOST);
    response_head.port = request_head.port;
    // response_head.key = request_head.key;