Skip to content

Closing socket endpoints not connected errors #479

@Jeez-nl

Description

@Jeez-nl

Fill out general information
OS (windows, linux, ...): Linux docker
BeamMP-Server Version: v3.9.2

Describe the bug
A clear and concise description of what the bug is.
Client connections occasionally cause the following error when the connection breaks;
[04/04/26 03:00:43] [INFO] Identifying new ClientConnection...
[04/04/26 03:00:43] [ERROR] Error during handling of code C - client left in invalid state, closing socket: remote_endpoint: Transport endpoint is not connected [system:107 at /__w/BeamMP-Server/BeamMP-Server/bin/vcpkg_installed/x64-linux/include/boost/asio/detail/reactive_socket_service.hpp:218:7 in function 'boost::asio::detail::reactive_socket_service::endpoint_type boost::asio::detail::reactive_socket_service::remote_endpoint(const implementation_type&, boost::system::error_code&) const']

This error may occur on initiation, but also after a successful connection if the client disconnects while downloading server files (cannot confirm if user choice or game crash).

Occasionally, connections are not terminated. I can see players connected to the server with 0 ping, and it is not possible to kick those players from the server console

To Reproduce
Steps to reproduce the behavior:
Cannot reproduce reliably. When connecting to my server myself, I have had no issues so far. I do have confirmation that this also happens on someone else's server, which is also hosted externally in a Linux Docker image

Expected behavior
The same behaviour as before the migration to the new systems

Logs
Please attach the Server.log from the run in which the issue appeared, preferably with Debug turned on in the ServerConfig.toml.

Server.old.log

Additional context
Add any other context about the problem here.

Server is running Nickel and Flood scripts, both of which return a nil value when getting playernames. I'm removing both to check if the issue persists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions