Closed Bug 1166599 Opened 11 years ago Closed 11 years ago

[Presentation WebAPI] TCP presentation server malfunctions after it is non-manually closed

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: CuveeHsu, Assigned: CuveeHsu)

References

Details

Attachments

(1 file, 1 obsolete file)

STR: 1. Let the server socket be closed non-manually 2. init the tcp presentation server again and create a device Expected result: create successfully Actual result: throws an exception
Hello Honza, I got trouble in |nsServerSocket|. In a _xpcshell_ test, I'd like to simulate a server socket is dead by non-manually closed such as network down. In other words, |aServerSocketListener.onStopListening| is called _not_ by |aServerSocket.close|. Any ideas? Thanks.
Flags: needinfo?(honzab.moz)
Attached patch initDevices (obsolete) — Splinter Review
WIP init |_devices| correctly and remove the redundant |TCPPresentationServer.close| Todo: to figure out a way to close server sockets non-manually
(In reply to Junior [:junior] from comment #1) > Hello Honza, > I got trouble in |nsServerSocket|. > In a _xpcshell_ test, I'd like to simulate a server socket is dead by > non-manually closed such as network down. > In other words, |aServerSocketListener.onStopListening| is called _not_ by > |aServerSocket.close|. > > Any ideas? > Thanks. Not by hand. I'm also not sure what you are trying to achieve. I presume gracefully closing the socket (after which you get RST when trying to connect) is not what you want, right? You could try up/down all interfaces the server is bound to, but this is not a question for me, rather ask some test harness folks.
Flags: needinfo?(honzab.moz)
BTW, google is probably your friend here ;)
We found |aServerSocketListener.onStopListening| is called after netd says hello to b2g in booting up. Some problems occur for this case. So yes, I'd like to _not_ gracefully closing server socket. Originally I guess there's some trick for doing this. For example, give a hint of offline as bug 1134596. I'll look around those possible tricks and try them later.
Attached patch initDevicesSplinter Review
make |_devices| init appropriately also remove the redundant |TCPPresentationServer.close|
Attachment #8608007 - Attachment is obsolete: true
Attachment #8611101 - Flags: review?(fabrice)
Depends on: 1120308
Attachment #8611101 - Flags: review?(fabrice) → review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: