Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Read operation over URLConnection is stuck!  RSS feed

 
Sang Pavi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We seem to have stuck at the read operation for some unknown reason.
We are trying to download a file using URLConnection.
When this code is part of our product, we see that the download is incomplete and only part of the file is read.
When the code is stuck, the last log statement that I see is "writing with totalSz".
The size of the incomplete file is random. It is not getting stuck after a constant value.

When the same code is written as a standalone program, the file is getting downloaded properly.
We ran this program in the same environment (Solaris) as our product.

 
Joe Ess
Bartender
Posts: 9425
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sang Pavi wrote:
When this code is part of our product, we see that the download is incomplete and only part of the file is read.
When the same code is written as a standalone program, the file is getting downloaded properly.


I don't see anything obviously wrong. What is the difference between running the code in your product and as a standalone program? Are you using an application server?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!