meh / elixir-socket

Socket wrapping for Elixir.
688 stars 119 forks source link

Socket.Web: support close with unknown code/reason #73

Open aurieh opened 7 years ago

aurieh commented 7 years ago

Any non-standard code/reason causes:

(CaseClauseError) no case clause matching: {code}
    (socket) lib/socket/web.ex:59: Socket.Web.recv/2
    (socket) lib/socket/web.ex:739: Socket.Web.recv!/2

Could you implement a fallback that fires :close with :unknown (or :abnormal) atom, and maybe provide the close code?