1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

B4J Question Unlock file

Discussion in 'B4J Questions' started by wl, May 1, 2019.

  1. wl

    wl Well-Known Member Licensed User


    I have a B4J HTTP server from which a client can download a file and after the file is download the client instructs the server to delete the file.

    When the download of the file is interrupted: the client tries to download the file a second time and afterwards tries to deleted the file. However, this is not working as the file is still being locked by the first server thread ?

    Any ideas ?

  2. Harris

    Harris Well-Known Member Licensed User

    The download job was not (likely) released.
    Do you have a code example?
    OliverA likes this.
  3. wl

    wl Well-Known Member Licensed User

    I added a try catch in the HTTP handler and made sure the stream is closed after the everything went well, or went something was wrong (so after the catch): now it is OK.

    Harris likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice