Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output operation on closed SSL stream #40

Open
MattSkinner opened this issue Aug 18, 2017 · 1 comment
Open

Output operation on closed SSL stream #40

MattSkinner opened this issue Aug 18, 2017 · 1 comment

Comments

@MattSkinner
Copy link

MattSkinner commented Aug 18, 2017

(handler-bind ((dex:http-request-failed #'dex:retry-request))
    (dexador:post "https://api001.backblazeb2.com/b2api/v1/b2_get_upload_url" 
        :content "{\"bucketId\": \"b78178f0df3db6975dd20544\"}" 
        :headers (list (cons "Authorization" "Something"))))

returns

output operation on closed SSL stream
   [Condition of type SIMPLE-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {1002EB7FA3}>)

Backtrace:
  0: ((:METHOD SB-GRAY:STREAM-FORCE-OUTPUT (CL+SSL::SSL-STREAM)) #<unavailable argument>) [fast-method]
  1: (FORCE-OUTPUT #<CL+SSL::SSL-STREAM for #<FD-STREAM for "socket xxx.xxx.xxx.xxx:35752, peer: xxx.xxx.xxx.xxx:443" {10082339E3}>>)
  2: (DEXADOR.BACKEND.USOCKET:REQUEST #<unavailable argument> :METHOD :POST :CONTENT "{\"bucketId\": \"b78178f0df3db6975dd20513\"}" :HEADERS (("Authorization" . "Password")))
  3: ((LAMBDA ()))

It looks like in usocket.lisp an assumption is made that the stream is still open when force-output is called on it. A quick look at cl-plus-ssl would seem to indicate that using ssl-stream-handle can be used to see if a stream is still open. If the stream is not open then maybe the retry code in usocket.lisp should start a new connection?

@fukamachi
Copy link
Owner

Perhaps, 8a01105 fixes this problem.
Please check if it still happens with the latest Dexador.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants