Skip to content

Unity connections do not close properly #346

@msanatan

Description

@msanatan

Ref: https://discord.com/channels/1330955894296543364/1402494886254739496/1428703736347496508

I encountered it as well on Windows, the Unity plugin does not correctly close its connections to the MCP server,

In PowerShell, I checked for network connections on port 6400:

Get-NetTCPConnection -LocalPort 6400 -ErrorAction SilentlyContinue | Select-Object LocalAddress, LocalPort, RemoteAddress, RemotePort, State, OwningProcess

And I got the following output:

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 127.0.0.1
RemotePort    : 63574
State         : CloseWait
OwningProcess : 7108

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 127.0.0.1
RemotePort    : 63541
State         : CloseWait
OwningProcess : 7108

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 127.0.0.1
RemotePort    : 63533
State         : CloseWait
OwningProcess : 7108

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 127.0.0.1
RemotePort    : 63557
State         : CloseWait
OwningProcess : 7108

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 127.0.0.1
RemotePort    : 63582
State         : CloseWait
OwningProcess : 7108

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 127.0.0.1
RemotePort    : 63534
State         : CloseWait
OwningProcess : 7108

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 127.0.0.1
RemotePort    : 63593
State         : CloseWait
OwningProcess : 7108

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 127.0.0.1
RemotePort    : 63577
State         : CloseWait
OwningProcess : 7108

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 127.0.0.1
RemotePort    : 63606
State         : CloseWait
OwningProcess : 7108

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 127.0.0.1
RemotePort    : 63603
State         : CloseWait
OwningProcess : 7108

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 127.0.0.1
RemotePort    : 63590
State         : CloseWait
OwningProcess : 7108

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 127.0.0.1
RemotePort    : 63576
State         : CloseWait
OwningProcess : 7108

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 127.0.0.1
RemotePort    : 63560
State         : CloseWait
OwningProcess : 7108

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 127.0.0.1
RemotePort    : 63536
State         : CloseWait
OwningProcess : 7108

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 127.0.0.1
RemotePort    : 63510
State         : CloseWait
OwningProcess : 7108

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 127.0.0.1
RemotePort    : 63506
State         : CloseWait
OwningProcess : 7108

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 127.0.0.1
RemotePort    : 63502
State         : CloseWait
OwningProcess : 7108

LocalAddress  : 127.0.0.1
LocalPort     : 6400
RemoteAddress : 0.0.0.0
RemotePort    : 0
State         : Listen
OwningProcess : 7108

Note all the CloseWaits. This indicated that the Unity process was not closing the connections on the socket. I got this error message from the plugin as this problem continued Bridge verification failed: Verification error: Unable to read data from the transport connection.

Metadata

Metadata

Assignees

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