Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321737

Summary: Throw more meaningful IOException when trying to read a packet from a closed socket
Product: [WebTools] JSDT Reporter: Michael Rennie <Michael_Rennie>
Component: DebugAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact: Simon Kaegi <simon_kaegi>
Severity: normal    
Priority: P3 CC: thatnitind
Version: 3.2   
Target Milestone: 3.3 M1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
proposed fix none

Description Michael Rennie CLA 2010-08-04 10:58:39 EDT
Created attachment 175839 [details]
proposed fix

code from HEAD

If for some reason the socket gets closed while the PacketRecieveManager is about to read from it you currently get a cryptic "Invalid content length: XX" IOException. 

We should check for socket closure before blindly trying to read from it, and throw a more meaningful exception.
Comment 1 Michael Rennie CLA 2010-08-04 11:00:12 EDT
The patch check for socket closure and throws an IOException that the socket has been closed.

applied to HEAD