Commit 0e3736c7 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[1429] Comments about blocking

parent 4220ef5a
...@@ -856,6 +856,9 @@ class BoB: ...@@ -856,6 +856,9 @@ class BoB:
"Missing parameter " + "Missing parameter " +
str(ke)) str(ke))
# FIXME: This call contains blocking IPC. It is expected to be
# short, but if it turns out to be problem, we'll need to do
# something about it.
token = self._socket_cache.get_token(protocol, addr, port, token = self._socket_cache.get_token(protocol, addr, port,
share_mode, share_name) share_mode, share_name)
return isc.config.ccsession.create_answer(0, { return isc.config.ccsession.create_answer(0, {
...@@ -873,6 +876,11 @@ class BoB: ...@@ -873,6 +876,11 @@ class BoB:
""" """
try: try:
fd = self._socket_cache.get_socket(token, unix_socket.fileno()) fd = self._socket_cache.get_socket(token, unix_socket.fileno())
# FIXME: These two calls are blocking in their nature. An OS-level
# buffer is likely to be large enough to hold all these data, but
# if it wasn't and the remote application got stuck, we would have
# a problem. If there appear such problems, we should do something
# about it.
unix_socket.sendall(CREATOR_SOCKET_OK) unix_socket.sendall(CREATOR_SOCKET_OK)
libutil_io_python.send_fd(unix_socket.fileno(), fd) libutil_io_python.send_fd(unix_socket.fileno(), fd)
except Exception as e: except Exception as e:
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