After closing the last Firefox tab, Firefox terminates, which leads to the following brotab error:
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/brotab/api.py", line 287, in close_tabs
api.close_tabs(args)
File "/usr/lib/python3.10/site-packages/brotab/api.py", line 104, in close_tabs
return self._get('/close_tabs/%s' % tabs)
File "/usr/lib/python3.10/site-packages/brotab/api.py", line 249, in _get
with urlopen(request, timeout=HTTP_TIMEOUT) as response:
File "/usr/lib/python3.10/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.10/urllib/request.py", line 519, in open
response = self._open(req, data)
File "/usr/lib/python3.10/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/usr/lib/python3.10/urllib/request.py", line 1377, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.10/urllib/request.py", line 1352, in do_open
r = h.getresponse()
File "/usr/lib/python3.10/http/client.py", line 1374, in getresponse
response.begin()
File "/usr/lib/python3.10/http/client.py", line 318, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.10/http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
ideas to fix:
keep track of the total number of tabs open in each client
expect not to receive a response when closing the last tab; or
instead of actually closing the last tab, open the homepage or about:blank; or
open a new tab with the homepage or about:blank just before closing the last tab
After closing the last Firefox tab, Firefox terminates, which leads to the following brotab error:
ideas to fix: