This repository was archived by the owner on Apr 27, 2019. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -441,6 +441,8 @@ def die(self):
441441 except AttributeError :
442442 pass
443443
444+ def connectionFailed (self , * args , ** kwargs ):
445+ self .connectionLost ()
444446
445447class ClientProtocol (Protocol ):
446448 """
@@ -503,7 +505,6 @@ def dataReceived(self, data):
503505 else :
504506 self .packet_stream += data
505507
506-
507508class StarryPyServerFactory (ServerFactory ):
508509 """
509510 Factory which creates `StarryPyServerProtocol` instances.
@@ -572,9 +573,9 @@ def reap_dead_protocols(self):
572573 protocol .connectionLost ()
573574 count += 1
574575 if count == 1 :
575- logger .debug ("1 connection reaped." )
576+ logger .info ("1 connection reaped." )
576577 elif count > 1 :
577- logger .debug ("%d connections reaped." )
578+ logger .info ("%d connections reaped." )
578579 else :
579580 logger .debug ("No connections reaped." )
580581
@@ -622,8 +623,6 @@ def buildProtocol(self, address):
622623 config .upstream_hostname , config .upstream_port ))
623624 logger .critical (
624625 "Please ensure that you are running starbound_server on the correct port and that is reflected in the StarryPy configuration." )
625- sock .shutdown ()
626- sock .close ()
627626 sys .exit ()
628627 sock .shutdown (SHUT_RDWR )
629628 sock .close ()
You can’t perform that action at this time.
0 commit comments