From f4152579079e45c650463287dfed44cf03ef60a4 Mon Sep 17 00:00:00 2001 From: Steve Markgraf Date: Thu, 31 May 2012 23:59:30 +0200 Subject: [PATCH] modes_sbs1: reuse socket Otherwise you'd have to wait until it times out... Signed-off-by: Steve Markgraf --- python/modes_sbs1.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/modes_sbs1.py b/python/modes_sbs1.py index 27d2428..79e7c1e 100644 --- a/python/modes_sbs1.py +++ b/python/modes_sbs1.py @@ -29,6 +29,7 @@ class modes_output_sbs1(modes_parse.modes_parse): def __init__(self, mypos): modes_parse.modes_parse.__init__(self, mypos) self._s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + self._s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) self._s.bind(('', 30003)) self._s.listen(1) self._s.setblocking(0) #nonblocking