InputStream from RemoteSocket.getInputStream functions differently to java.net.Socket's

Bug #716393 reported by Andrew Wilkins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pushy
Fix Released
Medium
Andrew Wilkins
0.4
Fix Released
Medium
Unassigned

Bug Description

With an InputStream returned from java.net.Socket, a call to InputStream.read(byte[] buf, int offset, int length) may return less than the requested number of bytes. A RemoteSocket's InputStream will block until all "length" bytes are available.

Related branches

Revision history for this message
Andrew Wilkins (axwalk) wrote :

This is due to the use of socket.makefile, which acts like a Python file object, in that it does not return partial results. Rather than use socket.makefile, I'll have to create a new InputStream class which calls the socket.recv method.

Andrew Wilkins (axwalk)
Changed in pushy:
status: Confirmed → Fix Committed
Andrew Wilkins (axwalk)
Changed in pushy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.