websockex icon indicating copy to clipboard operation
websockex copied to clipboard

Create termination error message

Open Azolo opened this issue 7 years ago • 4 comments

When any of the :gen modules terminate the create an error log. WebSockex should do that too.

Azolo avatar Jul 04 '17 16:07 Azolo

Yes, this is important because currently a WebSockex process exits silently in case of errors. Also please mention the terminate/2 callback in documentation and examples to highlight the importance of error reporting in terminate/2.

jurta avatar Jul 18 '17 08:07 jurta

@jurta It shouldn't be completely silent. If there was an error or any other kind of non-normal exit then there would at least be an exit message that was printed. If it was an error in a callback then it should also have a stacktrace associated with it.

If that's not happening, then I would consider it a bug.

As for the documentation, PRs are welcome. 😺

Azolo avatar Jul 18 '17 20:07 Azolo

not creating new issue, but what's the proper way to disconnect from server?

khodzha avatar Sep 09 '17 08:09 khodzha

not creating new issue, but what's the proper way to disconnect from server?

I think that is a really good documentation issue. But the proper way is to send a close message.

The easiest way to do this is probably with a :close callback return from a cast.

Azolo avatar Sep 14 '17 21:09 Azolo