diff options
author | 2019-03-27 13:40:05 +0200 | |
---|---|---|
committer | 2019-03-29 14:42:50 +0200 | |
commit | 25e5d3356c2836d51b0bace40dec7805f2c430b8 (patch) | |
tree | 1d68891e62cf763d901d8b0ce1f6e9516e27fbc4 /src/daemon | |
parent | 85f030c9ddcd1f3266d4eb6b51a9e89e1a4f5c26 (diff) | |
download | usurpation-25e5d3356c2836d51b0bace40dec7805f2c430b8.tar.gz usurpation-25e5d3356c2836d51b0bace40dec7805f2c430b8.tar.bz2 usurpation-25e5d3356c2836d51b0bace40dec7805f2c430b8.zip |
daemon: implemented verbose output on timeout.
Server daemon outputs error message when the client times out into
stderr.
This commit is part of ticket 3.
Signed-off-by: Paulius Ratkevičius <pauliuz95@gmail.com>
Diffstat (limited to 'src/daemon')
-rw-r--r-- | src/daemon/net.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/daemon/net.c b/src/daemon/net.c index 225d6d9..98dd154 100644 --- a/src/daemon/net.c +++ b/src/daemon/net.c @@ -180,6 +180,7 @@ static void *dolisten(void * state) /* no packets in five seconds */ if ((now.tv_sec - st->lastreply.tv_sec) >= 5) { st->status = DEAD; + fprintf(stderr, "Connection with the client has been lost. Last reply since: %li", st->lastreply.tv_sec); } else if (st->data[0] != 'I') { /* we don't actually want to have NONEWDATA set from this loop, * barring the one exeption that is after arrival of the beacon |