mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
After changing the `ws` dependency to be ignored, not exluded, by https://github.com/socketio/engine.io-client/pull/451 if the target runtime does not provide a `ws` module an error is throw. This is the case with NativeScript which currently does not have a WebSocket implementation. The change is using safe resolution with try-catch preseving the old behavior in a controlled manner.