Skip to content

Commit

Permalink
#5 Added destructor to the Streamer class
Browse files Browse the repository at this point in the history
Added the destructor method to the Streamer class which closes the opened socket.
  • Loading branch information
mkristofic committed Jan 4, 2020
1 parent c5efdf4 commit a9a5c85
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/modules/Streamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ def __init__(self, host, port, recorder):
self.server_address = (host, port)
self.camera = recorder

'''
Finalizer which is called after all the references to the object
have been deleted.
'''
def __del__(self):
self.sock.close()

'''
Gets a frame from camera and sends it to the server via UDP.
'''
Expand Down

0 comments on commit a9a5c85

Please sign in to comment.