friends-of-reactphp / stomp

STOMP bindings for ReactPHP.
MIT License
115 stars 42 forks source link

Throw a ConnectionException if the connection ends #25

Closed romainneutron closed 8 years ago

romainneutron commented 11 years ago

This is a fix for #24

I think we should move the stream_socket_client call when React\Stomp\Client::connect is called. We could provide automatic reconnection that way.

igorw commented 11 years ago

This should really be an error event instead of an exception. Or possibly an end event. Also, what if the client closed the connection intentionally? That case needs to be handled as well.

romainneutron commented 11 years ago

You are right, I'm gonna work deeper on this issue tomorrow. Are you okay to move the stream_socket_client at connect instead of construction ?

igorw commented 11 years ago

Sounds good, yes.