Skip to content

Handle shutdown correctly #7

Description

@cgay

/* according to documentation, shutdown only half-done,

define method accessor-close
    (accessor :: <unix-ssl-socket-accessor>, #key abort?, wait?)
 => (closed? :: <boolean>)
  let ssl* = accessor.socket-descriptor;
  let s = ssl-shutdown(ssl*);
  /* according to documentation, shutdown only half-done,
     and SSL-shutdown should be called again.
     but, calling ssl-shutdown again sends data; and when
     the other side has quit (eg openssl s_client with ctrl+c)
     this results in bus errors... */
//  if (s == 0)
//    let s = SSL-shutdown(ssl*);
//    if (s ~= 1)
//      SSL-error(ssl*, s);
//    end
//  elseif (s < 0)
  if (s < 0)
    ssl-error(ssl*, s);
  end;
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions