This is an automated email from the ASF dual-hosted git repository.

aonishuk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 4db8904  AMBARI-24638. Ambari-agent process consuming more memory. 
(aonishuk)
4db8904 is described below

commit 4db8904e67cd814bd775243717e049d95e2f92e1
Author: Andrew Onishuk <aonis...@hortonworks.com>
AuthorDate: Fri Sep 14 11:07:30 2018 +0300

    AMBARI-24638. Ambari-agent process consuming more memory. (aonishuk)
---
 ambari-common/src/main/python/ambari_ws4py/websocket.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ambari-common/src/main/python/ambari_ws4py/websocket.py 
b/ambari-common/src/main/python/ambari_ws4py/websocket.py
index 78d233e..53f1a43 100644
--- a/ambari-common/src/main/python/ambari_ws4py/websocket.py
+++ b/ambari-common/src/main/python/ambari_ws4py/websocket.py
@@ -480,7 +480,8 @@ class WebSocket(object):
         if not bytes and self.reading_buffer_size > 0:
             return False
 
-        self.reading_buffer_size = s.parser.send(bytes) or DEFAULT_READING_SIZE
+        with self.lock:
+          self.reading_buffer_size = s.parser.send(bytes) or 
DEFAULT_READING_SIZE
 
         if s.closing is not None:
             logger.info("Closing message received (%d) '%s'" % 
(s.closing.code, s.closing.reason))

Reply via email to