Mercurial Hosting > luan
comparison src/goodjava/rpc/RpcCon.java @ 1499:22e15cf73040
lucene.backup
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 09 May 2020 23:14:13 -0600 |
parents | 91c167099462 |
children | 973d3039c421 |
comparison
equal
deleted
inserted
replaced
1498:1b809d2fdf03 | 1499:22e15cf73040 |
---|---|
58 try { | 58 try { |
59 out.writeString(json); | 59 out.writeString(json); |
60 if( in != null ) { | 60 if( in != null ) { |
61 CountingInputStream countIn = new CountingInputStream(in); | 61 CountingInputStream countIn = new CountingInputStream(in); |
62 IoUtils.copyAll(countIn,out); | 62 IoUtils.copyAll(countIn,out); |
63 countIn.close(); | |
64 if( countIn.count() != lenIn ) { | 63 if( countIn.count() != lenIn ) { |
65 close(); | 64 close(); |
66 throw new RpcError("InputStream wrong length "+countIn.count()+" when should be "+lenIn); | 65 throw new RpcError("InputStream wrong length "+countIn.count()+" when should be "+lenIn+" - list = "+list); |
67 } | 66 } |
68 } | 67 } |
69 out.flush(); | 68 out.flush(); |
70 } catch(IOException e) { | 69 } catch(IOException e) { |
71 close(); | 70 close(); |