Skip to content

Packet too large #52

@nettnikl

Description

@nettnikl

Hi,

im getting an error connecting to my server (on a IPv6). The connection fails, because one of the initial packets fails to be send, because of its size.
This line here blocks it: https://github.com/Manevolent/ts3j/blob/master/src/main/java/com/github/manevolent/ts3j/protocol/socket/client/AbstractTeamspeakClientSocket.java#L354
Debugging it, it seems packet.getBody().getSize() is 493 and packet.getHeader().getSize() is 13, so the packet is indeed too big to pass the check.

Why is the check there? Do we have to adjust it?

...
[DEBUG] [PROTOCOL] READ INIT1
[DEBUG] Handle Init1 step 3
[DEBUG] State changing: DISCONNECTED
[DEBUG] Problem reading packet
[DEBUG] State changed: DISCONNECTED
java.lang.IllegalArgumentException: packet too large: 506; INIT1 cannot split
	at com.github.manevolent.ts3j.protocol.socket.client.AbstractTeamspeakClientSocket.writePacket(AbstractTeamspeakClientSocket.java:356)
	at com.github.manevolent.ts3j.protocol.socket.client.AbstractTeamspeakClientSocket.writePacket(AbstractTeamspeakClientSocket.java:322)
	at com.github.manevolent.ts3j.protocol.packet.handler.client.LocalClientHandlerConnecting.sendInit1(LocalClientHandlerConnecting.java:59)
	at com.github.manevolent.ts3j.protocol.packet.handler.client.LocalClientHandlerConnecting.handlePacket(LocalClientHandlerConnecting.java:139)
	at com.github.manevolent.ts3j.protocol.socket.client.AbstractTeamspeakClientSocket$NetworkHandler.run(AbstractTeamspeakClientSocket.java:935)
	at java.base/java.lang.Thread.run(Thread.java:1589)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions