Skip to content

Commit

Permalink
Merge pull request #940 from knmorgan/fix-factory-release-2
Browse files Browse the repository at this point in the history
Fix PiGPIO factory closing logic
  • Loading branch information
waveform80 committed Mar 12, 2021
2 parents 0516bc5 + 9e633e1 commit 39e049d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gpiozero/pins/pigpio.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ def close(self):
# If the factory has died already or we're not present in its
# internal list, ignore the error
pass
if not self.closed:
if not self._closed and self.pin_factory.connection:
self._closed = True
self.pin_factory.connection.bb_spi_close(self._select_pin)
self.pin_factory.release_all(self)
Expand Down

0 comments on commit 39e049d

Please sign in to comment.