소스 검색

Merge pull request #261 from javaJake/websocketclose

Only free conn if in client context.
bel2125 9 년 전
부모
커밋
75fcc82daa
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/civetweb.c

+ 2 - 2
src/civetweb.c

@@ -10974,9 +10974,9 @@ mg_close_connection(struct mg_connection *conn)
 		}
 		mg_free(client_ctx->workerthreadids);
 		mg_free(client_ctx);
+		(void)pthread_mutex_destroy(&conn->mutex);
+		mg_free(conn);
 	}
-	(void)pthread_mutex_destroy(&conn->mutex);
-	mg_free(conn);
 }