Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321737 - Throw more meaningful IOException when trying to read a packet from a closed socket
Summary: Throw more meaningful IOException when trying to read a packet from a closed ...
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: Debug (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.3 M1   Edit
Assignee: Michael Rennie CLA
QA Contact: Simon Kaegi CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-04 10:58 EDT by Michael Rennie CLA
Modified: 2010-08-04 11:00 EDT (History)
1 user (show)

See Also:


Attachments
proposed fix (2.74 KB, patch)
2010-08-04 10:58 EDT, Michael Rennie CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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