mirror of https://github.com/m-labs/artiq.git
comm_moninj: set keepalive for socket (#1843)
This commit is contained in:
parent
e45cb217be
commit
798a412c6f
|
@ -2,7 +2,7 @@ import asyncio
|
|||
import logging
|
||||
import struct
|
||||
from enum import Enum
|
||||
|
||||
from .comm import set_keepalive
|
||||
|
||||
__all__ = ["TTLProbe", "TTLOverride", "CommMonInj"]
|
||||
|
||||
|
@ -29,6 +29,8 @@ class CommMonInj:
|
|||
|
||||
async def connect(self, host, port=1383):
|
||||
self._reader, self._writer = await asyncio.open_connection(host, port)
|
||||
set_keepalive(self._writer.transport.get_extra_info('socket'), 1, 1, 3)
|
||||
|
||||
try:
|
||||
self._writer.write(b"ARTIQ moninj\n")
|
||||
# get device endian
|
||||
|
|
Loading…
Reference in New Issue