mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-14 19:04:59 -05:00
eb5764e7ab
Explanation: in this specific case, we were changing the state of the client to hanshaking (in autoVersion.js) before a connection was made (using setSocket), the consequence is the serializer was already piped to the framer when setSocket was called, and setSocket doesn't unpipe before piping. The consequence of that was the framer was piped 2 times, the packet was sent 2 times and the server kicked us. My solution is piping the serializer to the framer in Client constructor. Then if the state is changed, it will anyway automatically unpipe before repiping. Other places correctly unpipe before piping. Autoversion is now the default in nmp too |
||
---|---|---|
.. | ||
client_auto | ||
client_channel | ||
client_chat | ||
client_custom_channel | ||
client_custom_packets | ||
client_echo | ||
proxy | ||
server | ||
server_channel | ||
server_custom_channel | ||
server_helloworld |