Azure / azure-webpubsub

Azure Web PubSub Service helps you to manage WebSocket connections and do publish and subscribe in an easy way
https://azure.github.io/azure-webpubsub/
MIT License
132 stars 83 forks source link

Webpubsub automatically disconnects after the first websocket. send() and will be getting: WebSocket is already in a CLOSING or CLOSED state. #670

Closed renogies closed 9 months ago

renogies commented 9 months ago

Describe the bug

Webpubsub automatically disconnects after the first wbsocket. send() and will be getting: [closed] * click [ Test Send to Webpubsub ]

then after second click [ Test Send to Webpubsub ] will encounter is [already in a CLOSING or CLOSED state.]

To Reproduce

https://webpubsub-static-page.pages.dev/

code : `

  | -- | --   |   |   |   |   |   | Your Product   |   |   |     |
  |
  |     |
  |
  |   |   |   |
  |
  |
  |
  |
  |
  |
  | Product Image   |
  |
  |

Product Title

  |

Product Description goes here. Provide detailed information about the features and benefits of your product.

  |

$99.99

  |   |
  |
  |     |   |     |     |
  |
  |
  |     |   |   |   |     |   |     |

  |   |  

`

renogies commented 9 months ago

it need subprotocol like new WebSocket(data.url, 'json.webpubsub.azure.v1');