Bug 113748 - EventSource 'close' event doesn't fire when computer put in sleep mode
Summary: EventSource 'close' event doesn't fire when computer put in sleep mode
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-01 23:13 PDT by mdean8
Modified: 2017-02-02 02:54 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mdean8 2013-04-01 23:13:30 PDT
var source = new EventSource(url);

source.onopen = function() {
	console.log('opened');
};

source.onclose = function() {
	console.log('closed');
};

Reproduction steps:
1. Run the above code, where url points to a web page that supports SSE
2. Put your computer in sleep mode
3. Take your computer out of sleep mode
4. console.log(source.readyState == EventSource.CLOSED); // will print true

The 'close' event should be fired because the connection was cancelled and the object's readyState was set to EventSource.CLOSED.