Skip to content

Commit

Permalink
Merge pull request samuraisam#61 from bdavissl/file-descriptor-leak
Browse files Browse the repository at this point in the history
Fix for leaking file descriptor issue
  • Loading branch information
Samuel Sutch committed Nov 11, 2013
2 parents 5376e60 + 7f813ca commit cf904aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pyapns/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def write(self, notifications):
if conn_time > MAX_CONNECTION_TIME:
log.msg('APNSService write (disconnecting based on max connection time)')
self.factory.clientProtocol.transport.loseConnection()
self.factory.stopTrying()
self.factory = None

if not self.factory:
Expand Down

0 comments on commit cf904aa

Please sign in to comment.