TelescopeMount does not close its connection to the mount when __exit__() is called, which means that if a new object is created attempting to connect to the same mount it will fail with an error like the following:
Traceback (most recent call last):
File "/home/rgottula/dev/track/./scratch/test_mount_disconnect.py", line 29, in <module>
main()
File "/home/rgottula/dev/track/./scratch/test_mount_disconnect.py", line 23, in main
with mounts.make_mount_from_args(args) as mount:
File "/home/rgottula/dev/track/track/mounts.py", line 721, in make_mount_from_args
return LosmandyGeminiMount(
File "/home/rgottula/dev/track/track/mounts.py", line 546, in __init__
backend=point.gemini_backend.Gemini2BackendUDP(0.25, device_name),
File "/home/rgottula/dev/point/point/gemini_backend.py", line 169, in __init__
self._sock.bind(self._local_addr)
OSError: [Errno 98] Address already in use
TelescopeMount
does not close its connection to the mount when__exit__()
is called, which means that if a new object is created attempting to connect to the same mount it will fail with an error like the following:Fix this.