具体原因看下面的描述https://github.com/sockjs/sockjs-clientAlthough the 'SockJS' object tries to emulate the 'WebSocket' behaviour, it's impossible to support all features. One of the important SockJS limitations is the fact that you're not allowed to open more than one SockJS connection to a single domain at a time. This limitation is caused by a in-browser limit of outgoing connections - usually browsers don't allow opening more than two outgoing connections to a single domain. Single SockJS session requires those two connections - one for downloading data, the other for sending messages. Opening a second SockJS session at the same time would most probably block and can result in both sessions timing out.