Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommended shutdown method? #44

Open
steve-thousand opened this issue Apr 22, 2021 · 0 comments
Open

Recommended shutdown method? #44

steve-thousand opened this issue Apr 22, 2021 · 0 comments

Comments

@steve-thousand
Copy link

The driver doesn't seem to export a disconnect or shutdown method. After shutting down the processes I've spawned for other modules, I get the following error non-stop until the process that called connect() on the driver is stopped

Connecting to storage
Storage connection lost { Error: connect ECONNREFUSED 127.0.0.1:21025
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 21025 }
Connecting to storage
Storage connection lost { Error: connect ECONNREFUSED 127.0.0.1:21025
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 21025 }
Connecting to storage
Storage connection lost { Error: connect ECONNREFUSED 127.0.0.1:21025
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 21025 }

It looks like that is the result of a retry that exists in the common storage _connect() method that has an unending connect retry here https://github.com/screeps/common/blob/master/lib/storage.js#L150

Does a way exist to shutdown the driver so that these continuous attempts at connecting to killed processes will stop? And if not, is there a recommended way of starting the driver to prevent this kind of output?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant