~reykjalin/kakoune-mode#8: 
Unable to bind listen socket: Address already in use

Expected behavior

The extension can always start kakoune in the background without issues.

Actual behavior

It seems that sometimes the socket isn't properly closed after use, so the next time the extension starts it will fail with the following error:

uncaught exception (N7Kakoune13runtime_errorE):
unable to bind listen socket '/var/folders/55/3y48z4bx4s1fn9m69j1p05780000gn/T/kakoune/kristofer/vscode': Address already in use

This could probably be avoided by using randomized socket names, but I'm not sure if that's the best way to go about this. I've been using vscode as the socket name during development so I can connect another client to the same session to see what's happening in the file.

Proposed solution

  1. Use randomized socket names. This is probably the optimal solution.
  2. Make sure to run kak -clear before every session. This could cause problems when opening multiple VSCode windows that are all running the extension.
Status
REPORTED
Submitter
~reykjalin
Assigned to
No-one
Submitted
4 years ago
Updated
4 years ago
Labels
bug