Compare commits

..

No commits in common. "v0.0.2-develop.13" and "v0.0.2-develop.12" have entirely different histories.

4 changed files with 5 additions and 21 deletions

View File

@ -1,10 +1,3 @@
## [0.0.2-develop.13](https://git.lumeweb.com/LumeWeb/kernel-swarm-client/compare/v0.0.2-develop.12...v0.0.2-develop.13) (2023-07-22)
### Bug Fixes
* on write and end, log errors if we are trying to use a closed socket ([57efedd](https://git.lumeweb.com/LumeWeb/kernel-swarm-client/commit/57efedd0affd5e647db185aff0ba1be2a137aef3))
## [0.0.2-develop.12](https://git.lumeweb.com/LumeWeb/kernel-swarm-client/compare/v0.0.2-develop.11...v0.0.2-develop.12) (2023-07-22)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@lumeweb/kernel-swarm-client",
"version": "0.0.2-develop.13",
"version": "0.0.2-develop.12",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lumeweb/kernel-swarm-client",
"version": "0.0.2-develop.13",
"version": "0.0.2-develop.12",
"dependencies": {
"@lumeweb/libkernel": "^0.1.0-develop.9",
"async-mutex": "^0.4.0",

View File

@ -1,6 +1,6 @@
{
"name": "@lumeweb/kernel-swarm-client",
"version": "0.0.2-develop.13",
"version": "0.0.2-develop.12",
"type": "module",
"main": "lib/index.js",
"repository": {

View File

@ -229,24 +229,15 @@ export class Socket extends Client {
}
write(message: string | Buffer): void {
this.callModule("socketExists", { id: this.id }).then(
([exists]: ErrTuple) => {
if (!exists) {
logErr("tried to write to closed socket");
}
this.callModule("socketWrite", { id: this.id, message });
},
);
this.callModule("socketWrite", { id: this.id, message });
}
end(): void {
this.callModule("socketExists", { id: this.id }).then(
([exists]: ErrTuple) => {
if (!exists) {
logErr("tried to close a closed socket");
}
if (exists) {
this.callModule("socketClose", { id: this.id });
}
},
);
}