Skip to content

Commit

Permalink
Remove unused logger and change receive socket method
Browse files Browse the repository at this point in the history
Commented out an unused logger instantiation in `signal_reactions.py` to reduce unnecessary logging. Switched from non-blocking to blocking socket receive in `signal_receive_thread.py` to improve stability.
  • Loading branch information
pnearing committed Sep 14, 2024
1 parent 178c74c commit 08e3b3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/signal_cli_api/signal_reactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def __to_dict__(self) -> dict[str, Any]:
Create a JSON friendly dict.
:return: dict[str, Any]: The dict to provide to __from_dict__().
"""
logger: logging.Logger = logging.getLogger(__name__ + '.' + self.__to_dict__.__name__)
# logger: logging.Logger = logging.getLogger(__name__ + '.' + self.__to_dict__.__name__)
reactions_dict: dict[str, Any] = {
'reactions': []
}
Expand Down
3 changes: 1 addition & 2 deletions src/signal_cli_api/signal_receive_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,7 @@ def run(self) -> None:
# START RECEIVE LOOP:
while self._receiving:
try:
response_str: Optional[str] = __socket_receive_non_blocking__(self._receive_socket,
0.01)
response_str: Optional[str] = __socket_receive_blocking__(self._receive_socket)
except CommunicationsError as e:
if self._receiving is False:
break
Expand Down

0 comments on commit 08e3b3e

Please sign in to comment.