Rename constant so it makes more sense
This commit is contained in:
parent
07affb4c36
commit
c7af71456e
2 changed files with 4 additions and 4 deletions
|
@ -2,7 +2,7 @@ import select
|
|||
import socket
|
||||
|
||||
import ujson
|
||||
from ipc_unix.utils import DEFAULT_SOCKET_TIMEOUT, read_payload, socket_has_data
|
||||
from ipc_unix.utils import DEFAULT_SOCKET_READ_TIMEOUT, read_payload, socket_has_data
|
||||
|
||||
|
||||
class Subscriber:
|
||||
|
@ -55,7 +55,7 @@ class Publisher:
|
|||
self.accept_new_connection()
|
||||
|
||||
_, writable, errorable = select.select(
|
||||
[], self.connections, [], DEFAULT_SOCKET_TIMEOUT
|
||||
[], self.connections, [], DEFAULT_SOCKET_READ_TIMEOUT
|
||||
)
|
||||
|
||||
dead_sockets = []
|
||||
|
|
|
@ -3,10 +3,10 @@ import select
|
|||
import ujson
|
||||
|
||||
BUFFER_SIZE = 4096
|
||||
DEFAULT_SOCKET_TIMEOUT = 0.1
|
||||
DEFAULT_SOCKET_READ_TIMEOUT = 0.1
|
||||
|
||||
|
||||
def socket_has_data(sock, timeout=DEFAULT_SOCKET_TIMEOUT) -> bool:
|
||||
def socket_has_data(sock, timeout=DEFAULT_SOCKET_READ_TIMEOUT) -> bool:
|
||||
readable, _, _ = select.select([sock], [], [], timeout)
|
||||
return sock in readable
|
||||
|
||||
|
|
Reference in a new issue