python-eel / Eel

A little Python library for making simple Electron-like HTML/JS GUI apps
MIT License
6.44k stars 587 forks source link

Eel server crashes when computer sleeps #519

Open eatsana opened 3 years ago

eatsana commented 3 years ago

I'm using version 0.14.0

Whenever I'm running an eel project, once the computer sleeps and I eventually turn it back on, I've found that the command window has closed and when I reload the page, I get the error localhost refused to connect. This issue persists even when the program is converted to an exe using pyinstaller and even when the program in run in IDLE. This happens with EVERY eel project I've made using v0.14.0

Steps to reproduce the behavior:

  1. Create any eel app
  2. Run the app
  3. Make your computer sleep
  4. Wake up computer
  5. Reload page
  6. Stare in confusion at the error

Before computer sleeps(Command window/server still open): example

After computer sleeps(Command window/server closed): example2

Eel window after computer sleeps: example3