Windows 7 prevent sleep not working as expected

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
cristidb
Posts: 5
Joined: Thu Feb 12, 2015 4:47 am
Location: Bucharest

Windows 7 prevent sleep not working as expected

Post by cristidb »

Hello, I use UMS 5 on Windows 7 64bit. If Prevent windows from sleep is checked, the computer won't go to sleep at all. I expected this to prevent windows from sleep while streaming.
As a workaround, I disabled the feature and use coffee to prevent sleep while upload speed is at least 128k
http://coffee-sc.sourceforge.net/
cristidb
Posts: 5
Joined: Thu Feb 12, 2015 4:47 am
Location: Bucharest

Re: Windows 7 prevent sleep not working as expected

Post by cristidb »

Since nobody answered on this topic for one month, I fixed it myself. Now UMS prevents windows from sleeping only when streaming.
The problem was in the WinUtils class.
The fix only works when HTTP V2 is unchecked. If I have time, I will look in the HTTP V2 code.
Attachments
WinUtils.zip
(3.2 KiB) Downloaded 469 times
andycoo
Posts: 1
Joined: Mon Mar 30, 2015 7:20 am

Re: Windows 7 prevent sleep not working as expected

Post by andycoo »

Hi cristidb

Thanks very much for fixing this obvious limitation.
I'm not clear on whether you have committed this change and it's included in a new release, or you attached the file so we can rebuild ourselves.
Please could you clarify?

Thanks

Andy
cristidb
Posts: 5
Joined: Thu Feb 12, 2015 4:47 am
Location: Bucharest

Re: Windows 7 prevent sleep not working as expected

Post by cristidb »

The fix is not committed. I've only attached the modified class to this topic. Please review the fix and include it in the next build.
Post Reply