Commit 1e7aaa9f authored by Liang Ding's avatar Liang Ding

🚸 Fix #12417

parent ace27fe5
...@@ -42,12 +42,9 @@ import java.util.concurrent.ConcurrentHashMap; ...@@ -42,12 +42,9 @@ import java.util.concurrent.ConcurrentHashMap;
/** /**
* Statistic management service. * Statistic management service.
* <p>
* <b>Note</b>: The {@link #onlineVisitorCount online visitor counting} is NOT cluster-safe.
* </p>
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 2.0.1.0, Nov 27, 2017 * @version 2.0.1.1, Apr 1, 2018
* @since 0.5.0 * @since 0.5.0
*/ */
@Service @Service
...@@ -408,6 +405,10 @@ public class StatisticMgmtService { ...@@ -408,6 +405,10 @@ public class StatisticMgmtService {
* @param request the specified request * @param request the specified request
*/ */
public void onlineVisitorCount(final HttpServletRequest request) { public void onlineVisitorCount(final HttpServletRequest request) {
if (Requests.searchEngineBotRequest(request)) {
return;
}
final String remoteAddr = Requests.getRemoteAddr(request); final String remoteAddr = Requests.getRemoteAddr(request);
LOGGER.log(Level.DEBUG, "Current request [IP={0}]", remoteAddr); LOGGER.log(Level.DEBUG, "Current request [IP={0}]", remoteAddr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment