File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,6 @@ def _register_signal_handlers(self):
6262 def stop_with_signal (signum , frame ):
6363 self ._allow_stop = True
6464 self .stop_remote_server ()
65- raise KeyboardInterrupt
6665 for name in 'SIGINT' , 'SIGTERM' , 'SIGHUP' :
6766 if hasattr (signal , name ):
6867 signal .signal (getattr (signal , name ), stop_with_signal )
@@ -79,11 +78,12 @@ def _announce_start(self, port_file=None):
7978 pf .close ()
8079
8180 def serve_forever (self ):
82- try :
83- while not self ._shutdown :
84- self .handle_request ()
85- except KeyboardInterrupt :
86- pass
81+ if hasattr (self , 'timeout' ):
82+ self .timeout = 0.5
83+ else :
84+ self .socket .settimeout (0.5 )
85+ while not self ._shutdown :
86+ self .handle_request ()
8787
8888 def stop_remote_server (self ):
8989 prefix = 'Robot Framework remote server at %s:%s ' % self .server_address
You can’t perform that action at this time.
0 commit comments