Skip to content

Commit

Permalink
Add TCP keep alive options
Browse files Browse the repository at this point in the history
This should cause the connection to disconnect after a network outage.
  • Loading branch information
Andy753421 committed Apr 6, 2013
1 parent 06ce77a commit b71c2b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rhawk.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
KEEPALIVE="keepalive,keepidle=240,keepcnt=1,keepintvl=1"
cd /home/andy/src/rhawk
while true; do
socat TCP:'irc.freenode.net:6667' EXEC:'awk -f rhawk'
socat TCP:"irc.freenode.net:6667,$KEEPALIVE" EXEC:"awk -f rhawk"
sleep 30
done

0 comments on commit b71c2b6

Please sign in to comment.